Cmis 102

Submitted by: Submitted by

Views: 28

Words: 798

Pages: 4

Category: Science and Technology

Date Submitted: 03/29/2015 05:40 PM

Report This Essay

Program Description:

My program will consist of elements required to calculate the usable square feet of a house with a total of four rectangular rooms. I will provide three examples to test the program’s accuracy. The program will start by accepting the number of rooms. Followed by the dimensions of each room (length and width). After all of the dimensions have been input the area (Length*Width) of each room is calculated separately. The final area will give you the sum of the area of the four rooms. This will give you the usable area of the house (in square feet).

Analysis:

N will represent the number of the rooms, length and width will be represented by L and W respectively. The total and temporal areas will be represented by TotalArea and TempAreaN respectively.

Each room needs to be declared so that the program will know where each measurement belongs. Room#1 will be W and L1. I will use “input” to allow the input of the values the program will need to calculate. “Write” will be used to show what value is needed. Example: Write “What is the length of room one in feet?” I will use the “write” command to give you information about the data collected and computed. Example: Write “The usable square footage of the house is:” + TotalArea. I will use “+TotalArea” to show the user the value of the data. In order to solve this problem, you need to know how to calculate the area of a rectangle. This formula is area = length*width. To find the total area of the house you need to know how to add all of the areas of each room to get the total usable area. “Set” will be used to allow the program to set the equations. Example: Set N1=W1*L1

Input variables are W1, W2, W3, W4, L1, L2, L3, and L4 all of which are integers.

Each variable represents each room and its width and length.

The output variable is TotalArea (integer).

Program Design and Documentation:

There are three fundamental tasks that need to happen in order for the program to give the correct...