# Cmis102 Assignment 1

Only available on StudyMode
• Published : March 23, 2013

Text Preview

Problem definition: Calculate the usable area in square feet of house. Assume that the house has a maximum of four rooms, and that each room is rectangular. A. Problem Analysis – Following the directions in the assignment, clearly write up your problem analysis in this section. This program will compute the area of a house that has four rectangular rooms. Output is the value of the total area (total_area) of the house and is to be calculated by area/length/width input (A1, A2, A3, A4, L1, L2, L3, L4, W1, W2, W3, and W4) variables declared as float variables. The program will utilize the standard mathematical formula of obtaining area of a rectangle: A = L*W. As well, the formula will be coded in the program as Area=length*width (A=L*W) respectively for each room. L1 = length of first room, as float

W1 = width of first room, as float
A1=L1*W1
L2 = length of first room, as float
W2 = width of first room, as float
A2=L2*W2
L3 = length of first room, as float
W3 = width of first room, as float
A3=L3*W3
L4 = length of first room, as float
W4 = width of first room, as float
A4=L4*W4

B. Program Design – Following the directions in the assignment, clearly write up your problem design in this section and comment your pseudocode. Raptor software will be used in designing and testing this program. The three fundamental tasks of creating a program will be incorporated: 1) Input Data:

Use of Raptor to add Input and Assignment symbols will allow user to input data when running the program. The Main and Input_Data modules will heavily use the Input and Assignment symbols in Raptor. In the Input_Data_module, variables will be assigned and declared. As well, the Main module will execute the entire program by calling the completed sub-charts. 2) Calculate formula:

Use formulas to attain total_area of the house by calculating area of each of the four rooms. total_area = A1 + A2...