Cmis102Hw1

Submitted by: Submitted by

Views: 67

Words: 366

Pages: 2

Category: Science and Technology

Date Submitted: 12/11/2014 06:50 AM

Report This Essay

CMIS102

PROGRAM DESCRIPTION: This is a program designed to calculate the total usable area of a 4-room house in square feet.

ANALYSIS: In order to determine the area of a rectangle-shaped room, the length of one side of the room will be multiplied by the width of one side of the room represented as A=l*w. Each measurement is done in feet, so the resulting area will be in square feet. To determine the total area using multiple rooms, the areas for each room will be calculated individually and then added together for the answer represented as TA=(l*w)+(l*w)+(l*w)+(l*w). In this program, the input will be each room, represented as RM1, RM2, etc. One output will be the result of multiplying the length and width of each room. Another output will be the result of adding each area measurement to get the total usable area.

Variables and Definitions:

Length-The longest dimension of an object, represented in this program as L#, “#” will be the actual number being calculated.

Width-The measurement taken at right angles to the length, represented in this program as W#, “#” will be the actual number being calculated.

Area-The measurement of surface included within the lines of a two-dimensional geometric shape expressed in square units, represented in this program as RM1, RM2, RM3, and RM4.

Total Area-The sum of each individual area calculation expressed in square units, represented in this program as TA.

TEST PLAN

HOUSE NUMBER | INPUT | EXPECTED OUTPUT |

1 | RM1=L11*W10RM2=L12*W10RM3=L14*W13RM4=L9*W7 | TA=475 sq. ft. |

2 | RM1=L12*W10RM2=L12*W10RM3=L14*W12RM4=L15*W13 | TA=603 sq. ft. |

3 | RM1=L12*W11RM2=L13*W11RM3=L21*W14RM4=L18*W15 | TA=839 sq. ft. |

PSEUDOCODE (using House 2 data):

//This program will use the area of 4 rooms in a house to determine the total usable area of the house

//Declare variables

Declare RM1, RM2,RM3,RM4,TA as Integer

//Set values of Integers

Set RM1=12*10

Set RM2=12*10

Set RM3=14*12

Set RM4=15*13

Set...

More like this