Cmis102 Assignment 1 Essay

736 Words Apr 2nd, 2013 3 Pages
CMIS102 Homework Assignment 1 (Worth 13% of your grade)

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
…show more content…
The design of the modular program will be created in Raptor and the design will look like this:
Main module:
Comment: “This program computes the total area of a four bedroom house in square footage.
Call Input_Data_module
Call Calculations_module
Call Output_Data_module
Write “Length of first room” (L1)
Write “Width of first room” (W1)
Write “Length of second room” (L2)
Write “Width of second room” (W2)
Write “Length of third room” (L3)
Write “Width of third room” (W3)
Write “Length of fourth room” (L4)
Write “Width of fourth room” (W4)
Call Calculations_module
Perform Calculations module:
Declare A1, A2, A3, and A4; as float
Set A1 = L1*W1
Set A2 = L2*W2
Set A3 = L3*W3
Set A4 = L4*W4
Set total_area = (A1+A2+A3+A4)
Output Data module:
Write “The total area of house is:” + total_area

C. Program Comments and Test Data – Following the directions in the assignment, include your test data and expected results in this section.

Table 1. Include your test data table here

TEST RUN OF DATA INPUT INTO PROGRAM Room#: | Input: Length & Width (in feet) | | Expected Output: Footage of house (in feet) | | Test Run 1 | Area of Rectangle : | A=L*W | Room 1 | L=10, W=5 | | 50=10*5 | Room 2 | L=10, W=5 | | 50=10*5 | Room 3 |

More about Cmis102 Assignment 1 Essay

Open Document