1 / 4

Algorithms, Part 3 of 3

This in-class project focuses on writing generic algorithms for solving the problems of computing box volume and surface area, as well as drawing a solid rectangle. The program also includes error checking to ensure that the dimensions provided are greater than zero.

Télécharger la présentation

Algorithms, Part 3 of 3

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Algorithms, Part 3 of 3 Topics • In-Class Project: The Box • In-Class Project: Drawing a Rectangle Reading • None

  2. Writing Algorithms from Scratch • Given a problem statement, we are going to write the corresponding generic algorithm for the solution. • We will use the following procedure: • Determine the algorithm inputs and outputs • Pseudocode a rough algorithm • Complete the pseuodocode

  3. The Box Problem: Write an interactive program to compute and display the volume and surface area of a box. The program must also display the box dimensions. Error checking should be done to be sure that all box dimensions are greater than zero.

  4. Drawing a Rectangle Problem: Write an interactive program that will draw a solid rectangle of asterisks (*). The program must also display the dimensions of the rectangle. Error checking must be done to be sure that the dimensions are greater than zero.

More Related