Cmis 102 Hw1

Submitted by: Submitted by

Views: 59

Words: 316

Pages: 2

Category: Other Topics

Date Submitted: 12/10/2014 05:49 AM

Report This Essay

Program Description: There are multiple things that need to happen for this to work properly. We must input the width and length of each room of the house.It will then find the area by multiplying the length times the width and then add those values together to get the usable square footage. The results of these calculations should appear in the output screen.

Analysis:

-This program will be used to find the square footage of a house

-All lengths will be defined as A, all widths will be defined as B

-I will state sequential programming statements

-I will define three integer numbers A,B, and C for the multiplication equation

-C will store the product of A and B

-I will sum C1, C2, and C3 to give the total square footage of a house

Test Case #

Input

Expected Output

Pass/Fail

Test 1

Room 1 Length: 15 , Width: 12,

Room 2 Length: 10, Width: 10,

Room 3 Length: 7, Width: 7,

329 Square Feet

Pass

Test 2

Room 1 Length: 9, Width: 8,

Room 2 Length: 22, Width: 20,

Room 3 Length: 10, Width: 8,

592 Square Feet

Pass

Test 3

Room 1 Length: 15, Width:15,

Room 2 Length: 12, Width:14,

Room 3 Length: 5, Width:5,

418 Square Feet

Pass

Psuedocode:

Begin Program

This program will multiply two integers A and B to yield a third, C

It will also sum three integers C1, C2, and C3 to produce a fourth, the square footage

Declare Variables

“*”=multiply

A(1,2, and 3)= Length

B(1,2, and 3)= Width

C(1,2, and 3)= Square footage of individual room

Specify Room 1

define A1

define B1

define C1= (A1*B1)

Specify Room 2

define A2

define B2

define C2= (A2*B2)

Specify Room 3

define A3

define B3

define C3= (A3*B3)

Set Square feet = C1+C2+C3

End Program