University of Cincinnati
Department of Computer Science
CS 121002 Computer Science 1
Laboratory 3
Design Report
Benjamin Jones
22 January 2008
1. Introduction
The purpose of this laboratory is to learn how to utilize input/output statements, expressions,
assignment statements, integer variables, constants, and IF statements in a practical example
involving calculating the area of several geometric figures.
More specifically, the program must calculate the area of a circle, square, or isosceles
triangle, depending on what the user wants. The program will be reprogrammed several times
using different standards.
2. Design
Main Module
1.
Get input from user
a)
Read input
b)
Determine whether the user selected triangle, circle, or square
1.
Get input from user depending on each figure
a)
If square get length
1.
Read input
b)
If circle get diameter
2.
Read input
c)
If triangle get height
3.
Read input
2.
Calculate area of the selected geometric figure
a)
If square, calculate area of a square
b)
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview.
Sign up
to
access the rest of the document.
 Winter '08
 Carter
 Computer Science, Geometry, 32bit, Input Expected Output, University of Cincinnati Department of Computer Science, Expected Test Input

Click to edit the document details