Cmis 102 Assignment 1

527 Words3 Pages
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. • In writing this program I am trying to calculate the number of square feet in a 4-room house. In doing this we need to output these values: - SquareFt1: The total square footage of room 1 - SquareFt2: The total square footage of room 2 - SquareFt3: The total square footage of room 3 - SquareFt4: The total square footage of room 4 - Rm1L: The length of room 1 - Rm1W: The width of room 1 - Rm2L: The length of room 2 - Rm2W: The width of room 2 - Rm3L: The length of room 3 - Rm3W: The width of room 3 - Rm4L: The length of room 4 - Rm4W: The width of room 4 - TotalSqFt: The total square footage of the 4-room house • The necessary input needed to calculate the number of square feet is: the length of each room and the width of each room. The programmer would not know these values, so the values of Rm1L, Rm1W, Rm2L, Rm2W, Rm3L, Rm3W, Rm4L, and Rm4W would be inputted by the user. • To obtain the required output from the given input you need to calculate the square footage of each room by multiplying the length by the width in each room, and then add those 4 totals together to get the total square footage of the 4-room house. - Formula Examples: SquareFt1 = Rm1L * Rm1W Set TotalSqFt = SquareFt1 + SquareFt2 + SquareFt3 + SquareFt4 B. Program Design – Following the directions in the assignment, clearly write up your problem design in this section and comment your pseudocode. //Declare Variables Declare SquareFt1 Declare SquareFt2 Declare SquareFt3 Declare SquareFt4 Declare Rm1L Declare Rm1W Declare Rm2L Declare Rm2W Declare Rm3L Declare

More about Cmis 102 Assignment 1

Open Document