Free Essay

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.

In:

Submitted By atlwarrior
Words 478
Pages 2
CMIS102 Homework Assignment 1

Student Name: Clarence Loveless

Class/Section: CMIS102

Professor Name: Nickolas Pitocco

Assignment due date: 13 Sept 13

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

1. What is the usable living area of 4 room house (output)

2. What is the length of room 1 (length1) - input

3. What is the width of room 1 (width2) – input

4. What is the sq footage of room1 (sqft1)– float variable

5. What is the length of room 2 (length2) - input

6. What is the width of room 2(width2) – input

7. What is the sq footage of room2(sqft2) – float variable

8. What is the length of room 3(length3) – input

9. What is the width of room 3(width3) - input

10. What is the sq footage of room3(sqft3) – float variable

11. What is the length of room 4 (length4)- input

12. What is the width of room 4 (width4)– input

13. What is the sq footage of room4(sqft4) – float variable

14. Add each sq footage together for total living area – float variable

Formulas – sq footage=length*Width

Total living area=sq footage1+sqfootage2+sqfootage3+sqfootage4

B. Program Design – Following the directions in the assignment, clearly write up your problem design in this section and comment your pseudocode.

Input date module

Write “What is length of room 1”

Input length1

Write “What is the width of room 1”

Input width1

Write “What is the length of room 2”

Input length2

Write “What is the width of room 2”

Input width2

Write “What is the length of room 3”

Input length3

Write “What is the width of room 3”

Input width3

Write “What is the length of room 4”

Input length4

Write “What is the width of room 4”

Input width4

Perform Calculations module

Set Sqt footage=length*width

Set Total living area=sq footage1+sq footage2+ sq footage3+sq footage4

Write Results module

Write Sq footage1

Write Sq footage2

Write Sq footage3

Write Sq footage4

Write Total living 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

|Input: Room length and width (in feet) |Expected output: Total square footage of house (in square feet) |
|Room 1: length=25, width 20 |2600 |
|Room 2: length=40, width 30 | |
|Room 3: length= 15, width 10 | |
|Room 4: length=25, width 30 | |
|Room 1: length=10, width 15 |482 |
|Room 2: length=12, width 11 | |
|Room 3:length=9, width 10 | |
|Room 4: length=10, width 11 | |
|Room 1: length=18, width 10 |865 |
|Room 2: length=20, width 16 | |
|Room 3: length= 14, width 10 | |
|Room 4: length=15, width 15 | |

Similar Documents

Free Essay

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

...Section 7986 Professor Name: Jose Romero Assignment due date: April 1, 2012 Assignment: 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. 1) Problem analysis This Program is intended to compute the area of a house composed of four rectangular rooms. Indeed, for this problem, we need to output the value of the total area of the house after finding and summing the areas of each room. For this to be possible, we will define output and input variables. Therefore, for this program, we will need to output the value of the following variable: * The value of the area of the house total_area (a Float variable) We will also need to input the value of the length and width of each room, subsequently the following variables: * The value of the length of the first room length1 (a Float variable) * The value of the width of the first room width1 (a Float variable) * The value of the length of the second room length2 (a Float variable) * The value of the width of the second room width2 (a Float variable) * The value of the length of the third room length3 (a Float variable) * The value of the width of the third room width3 (a Float variable) * The value of the length of the fourth room length4 (a Float variable) * The value of the width of the fourth room width4 (a Float variable) We will also need to define the value of others variable necessary to...

Words: 801 - Pages: 4

Free Essay

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.

...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: What is the required output? Total square footage of a house (in square feet) What is the necessary input? Room 1, 2, 3, and 4 length and width. How will we obtain output from input? Each room length and width input multiplied. Next all four rooms total add together for output. B. Program Design: 1. Input data: Input the variables Rm1L, Rm1W, Rm2L, Rm2W, Rm3L, Rm3W, Rm4L, Rm4W 2. Perform calculations: where… Rm1sqft = Rm1L * Rm1W, Rm2sqft = Rm2L * Rm2W, Rm3sqft = Rm3L * Rm3W, Rm4sqft = Rm4L * Rm4W, where… Housesqft = Rm1sqft + Rm2sqft + Rm3sqft + Rm4sqft 3. Output results: Display the total square feet (Housesqft) of the house // House Measurement Computation // Programmer: Neal Fowler Main module // Declare Variables Declare Rm1L Declare Rm1W Declare Rm2L Declare Rm2W Declare Rm3L Declare Rm3W Declare Rm4L Declare Rm4W Declare Rm1sqft Declare Rm2sqft Declare Rm3sqft Declare Rm4sqft Declare Housesqft Write “Home Measurement Program” Write “This program computes the total” Write “square feet (living space) of a house.” Call Input Data module Call Perform Calculations module Call Output Results module End Program Input Data module // Get the measurements of each room Write “What is room 1 length?” Input Rm1L Write “What is room 1 width?” Input Rm1W ...

Words: 472 - Pages: 2

Free Essay

Assignment1

...Homework #1 Calculate the usable area in square feet of a house. Assume that the house has a maximum of four rooms, and that each room is rectangular. Program Description The purpose of this program is to calculate the usable area (square feet) of a four room house. Analysis To calculate the usable area in square feet in the house I would first need to identify the inputs and outputs. I know the house has a maximum of 4 rooms that are rectangular in shape, this is my input. Using the area formula (L x W) I can determine the square feet for each room. Adding the square feet for each room will provide the amount of usable area in square feet of the house and my output for this program. Test Plan Test Case # | Input | Expected Output | Results | 1 | Room 1: length = 16, width = 14Room 2 length = 13, width = 13Room 3: length = 10, width = 11 | 503 square feet | Pass | 2 | Room 1: length = 12, width = 16Room 2 length = 11, width = 14Room 3: length = 10, width = 11 | 456 square feet | Pass | 3 | Room 1: length = 12, width = 12Room 2 length = 12, width = 11Room 3: length = 11, width = 10 | 386 square feet | Pass | Pseudocode //This program will calculate the usable area in square feet of a four room house //Declare WidthRoom1, LengthRoom1 As Float // Declare WidthRoom2, LengthRoom2 As Float //Declare WidthRoom3, LengthRoom3 As Float //Declare WidthRoom4, LengthRoom4 As Float //Declare TotalHouseSquareFeet As Float Write “This program will help you calculate...

Words: 273 - Pages: 2

Free Essay

Assignment1

...problem here is to calculate the usable area in square feet of house. We are to assume that the house has a maximum of four rooms, and that each room is rectangular. Problem Analysis Objective: Devise a program that calculates the usable area of a house. This is minimally what is being requested. • Outputs: This problem calls for a simple output, the total usable square foot of the house, with a maximum of four rooms, each room being rectangular. Total number of square foot = Area of Room1 + Area of Room2 + Area of Room3 + Area of Room4 • Inputs: The problem will require us to know the length and width of each of the four rectangular rooms in order to compute the correct output, the total number of square foot. The length multiplied by the width of each of the four rectangular rooms will give us area of each room. We will receive these data points by measuring the dimensions of the room. Length1 x Width1 = Area of Room1 • Calculation Approach: In order to calculate the Total Square Foot of the house, we will need to take the sum of the areas of each room. o Area of Room 1 = Length of Room1 x Width of Room1 o (Repeated four times – once for each room) o Total Square Foot of House = Area of Room1 + Area of Room2 + Area of Room3 + Area of Room4 • Define variables: AreaofRoom1 = square foot area of the room 1 AreaofRoom2 = square foot area of the room 2 AreaofRoom3...

Words: 928 - Pages: 4

Free Essay

Calculate Square Footage

...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 this program the overall goal is to obtain the usable area in square feet in a house. The results or overall goal would be considered the required output. To obtain the required output we would need the necessary input. The necessary information regarding the house is that it contains a maximum of four rooms that are rectangular in shape. I will obtain the required output from the given input by multiplying length x width to find the number of square feet in each rectangular room. Once the combined square footage of each room is determined this will give me the amount of usable living space. We would need to know each room length and width, then calculate each rooms area and then find the sum of all four rooms. Area of Room 1= Length1 x Width1 Area of Room 2= Length2 x Width2 Area of Room 3= Length3 x Width3 Area of Room 4= Length4 x Width4 Area of Room 1 + Room 2 + Room 3 =Room 4 = Total Square footage B. Program Design – Following the directions in the assignment, clearly write up your problem design in this section and comment your pseudocode. Useable square footage of a house Rooms- Total number of Rooms = 4 Area-Area=L x W of each room Variables= Length, width, area Perform...

Words: 643 - Pages: 3

Premium Essay

Problem

...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 order to determine the usable area of the house I must first find out what is the total square feet area of each of the four rooms. I know that to get the area of each room I have to multiply LengthFeet X WidthFeet and that will give me the area of a 1 Room. Then I must do this to all four rooms, therefore, the results of the total area of the four rooms will give me the usable area of the house. My output variables are: UsableAreaFeet (float variable), AreaOfRoomFeet (float variable). Input variables: Length (float variable) and Width (float variable) and AreaOfRoomFeet (float variable). Formulas need it: AreaOfRoomX=Length X Width Where X is rooms 1-4,   UsableAreaFeet=AreaOfRoom1Feet + AreaOfRoom2Feet + AreaOfRoom3Feet + AreaOfRoom4Feet B. Program Design – Following the directions in the assignment, clearly write up your problem design in this section and comment your pseudocode. PseudoCode Input Data Module: Input: LengthFeet, WidthFeet, AreaOfRoomXFeet Perform Calculations Module Compute: AreaOfRoomXFeet   Here the formula use will be AreaOfRoomX = Length X Width Compute: UsableAreaFeet         Here I will use the this equation: UsableArea = AreaOfRoom1 + AreaOfRoom2 +...

Words: 285 - Pages: 2

Premium Essay

Homework1

...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. In order to determine the usable area of the house I must first find out what is the total square feet area of each of the four rooms. I know that to get the area of each room I have to multiply LengthFeet X WidthFeet and that will give me the area of a 1 Room. Then I must do this to all four rooms, therefore, the results of the total area of the four rooms will give me the usable area of the house. My output variables are: UsableAreaFeet (float variable), AreaOfRoomFeet (float variable). Input variables: Length (float variable) and Width (float variable) and AreaOfRoomFeet (float variable). Formulas need it: AreaOfRoomX=Length X Width Where X is rooms 1-4, UsableAreaFeet=AreaOfRoom1Feet + AreaOfRoom2Feet + AreaOfRoom3Feet + AreaOfRoom4Feet B. Program Design – Following the directions in the assignment, clearly write up your problem design in this section and comment your pseudocode. PseudoCode Input Data Module: Input: LengthFeet, WidthFeet, AreaOfRoomXFeet Perform Calculations Module Compute: AreaOfRoomXFeet Here the formula use will be AreaOfRoomX = Length X Width Compute: UsableAreaFeet Here I will use...

Words: 560 - Pages: 3

Free Essay

Cmis102 Hw1

...following task: Calculate the usable area in square feet of a house. Assume that the house has a maximum of four rooms, and that each room is rectangular. I. Problem Analysis 1.) To find the usable area in square feet of a house, what is the necessary input needed to solve the problem? -Each room needs to be declared so that the program will know where each measurement belongs. Room#1 will be WidthFeet1 and LengthFeet1. -Use the command of “input” which will allow the user to input the values the program will need to calculate. -Use the command of “write” to let the user know what value is needed, i.e., Write “What is the length of room one in feet?” To ask the user “What is the length of room one in feet?” Use that statement and function for each room. 2.) To find the usable area in square feet of a house, what are the necessary outputs needed to solve the problem? -Use the “write” command to give the user information about the data collected and computed. Example: Write “The usable square footage of the house is:” + TotalSquarefeet -I want to display to the user the areas of each room and total usable space. -I will use “+TotalSquarefeet” to show the user the value of the data 3.) To find the total usable living space in square feet of a house, what are the steps needed to solve the problem? -In order to solve this problem, I need to know how to calculate the area of a rectangle. This formula is square feet= length*width ...

Words: 776 - Pages: 4

Free Essay

Calculating Sq Footage of a Room

...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. |Input |Processing |Output |roomWidth |Read roomWidth |totalArea |roomLength |Read roomLength | |Calculate area | |Calculate totalArea | |Display totalArea B. Program Design – Following the directions in the assignment, clearly write up your problem design in this section and comment your pseudocode. Begin Declare roomWidth, roomLength, area, totalArea = 0 Write “Please enter the width and length of room 1: “ Input roomWidth Input roomLength Set area = roomWidth * roomLength Set totalArea = totalArea + area Write “Please enter the width and length of room 2 (enter 0 if...

Words: 331 - Pages: 2

Premium Essay

Adas

...November 2013 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. a. What is the required output? i. Total square feet of the house. TotalSquareFeet b. What is the necessary input? i. Length of each room. Length# ii. Width of each room. Width# iii. Square feet of each room. SquareFeet# c. How will we obtain the required output from the given input? i. SquareFeet# = Length# x Width# ii. TotalSquareFeet = SquareFeet1 + SquareFeet2 + SquareFeet3 + SquareFeet4 d. Variable names and definitions. i. TotalSquareFeet = The total square feet of the house. ii. Length# = The length of the room with the corresponding number. iii. Width# = The width of the room with the corresponding number. iv. SquareFeet# = The total square feet of the room with the corresponding number. B. Program Design – Following the directions in the assignment, clearly write up your problem design in this section and comment your pseudo code. Total Square Feet of the house Rooms – Total number of rooms = 4 SquareFeet = Length x Width of each room Variables = TotalSquareFeet, Length#...

Words: 257 - Pages: 2

Free Essay

Cmis 102

...Course: CMIS 102  Date: 1/23/2014 Problem: 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. We are trying to calculate the square feet of a 4 bedroom house To do this, I will need to know each room’s length and breadth, then calculate each room’s area before I will then find the total. Map: When * = times Sum = total Room# =Room number Length# = length or a particular room Breadth# = breadth or a particular room Formula: Area of Room1=length1*breadth1 Area of Room2=length2*breadth2 Area of Room3=length3*breadth3 Area of Room4=length4*breadth4 The total Number of Square Foot’s = Area of room1+ Area of room2+ Area of room3+ Area of room4 Program Design Pseudo code: Start Declare the variables v ,A as integer length[4], breadth[4],area[4] as double array sum as double Display “Enter the Rooms length and Breadth” For v = 1 to 4 do Accept length[v], breadth[v] Next v Display “Finding Area and total number of square foots” Set sum =0 For A= 1 to 4 Area [A] = length [A]* breadth [A] Sum = sum + Area [A] Next A Display “Total number of square foots”, sum Stop Program Comments and Test Data C++ code: #include<iostream> #include<string> Using namespace std; int main() { int v,A; double length[4], breadth[4] ,area[4], sum; } cout<<"\nEnter the length and breadth of each room"; for (v=0;v<4;v++) { cout<<"\nRoom "<<v+1<<"...

Words: 420 - Pages: 2

Free Essay

Housesqft Cmis102

...CMIS102 Homework Assignment 1 (Worth 13% of your gradeProblem 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. The primary goal is to calculate the square footage of a 4-room house. In order to do this, we need to know each room’s length and width, then calculate the area of each room and lastly find the sum of the area of each of the four rooms.  * Area of Room1=length1*width1 * Area of Room2=length2*width2 * Area of Room3=length3*width3 * Area of Room4=length4*width4 Total Number of Square Feet = Area of Room1+ Area of Room2+ Area of Room3+ Area of Room4 B. Program Design – Following the directions in the assignment, clearly write up your problem design in this section and comment your pseudocode. We need to output the value of the total area of the house after finding and summing the areas of each room. For this to be possible, we will define the input and output variables. Variables Length of Room 1 = length1 (Float) (followed to) Length of Room 4 = length4 (Float) Width of Room 1 = width1 (Float) (followed to) Width of Room 4 = width4 (Float) Additional Variables Area = length*width Area1 = length1 * width1 (float variable) Area2 = length2 * width2 (float variable) Area3 = length3 * width3...

Words: 640 - Pages: 3

Free Essay

Data

...due date: 08/31/2014 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. Problem= We are trying to find out what the square footage of each room of a house and the square footage of the entire house. The input would include the length and width of each room and the formula to find the answer. The output would need to include the square footage of each room and the total square footage of the house. If all the code is properly executed, we will be able to input any sized room and quickly be able to find the square footage. B. Program Design – Following the directions in the assignment, clearly write up your problem design in this section and comment your pseudocode. Main module Declare EntireHouse As String Declare LivingRoom, As Float Declare Kitchen As Float Declare BedRoom As Float Declare BathRoom As Float Write “Square Footage Program” Write “This program computes the square footage of individual rooms and” Write “the total area of houses” Call Input Data module Call Perform Calculations module Call Output Results module End Module Input Data Module Write “What is the length of the room?” Input RoomLength Write “What is the width of the room?” Input RoomWidth Perform Calculations module ...

Words: 283 - Pages: 2

Free Essay

Cmis102 Homework Assignment 1

...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. You need to determine the area of 4 rooms added together so you will need to allow the user to input both length and width for 4 separate rooms. You will then need to write code to multiply the length and width of each room separately and then add all four together. All variables will need to be float in anticipation of fractions of feet. length1 = first room length width1 = first room width area1 = area of first room length2 = second room length width2 = second room width area2 = area of second room length3 = third room length width3 = third room width area3 = area of third room length4 = fourth room length width4 = fourth room width area4 = area of fourth room totalarea = final output variable for total square feet of home B. Program Design – Following the directions in the assignment, clearly write up your problem design in this section and comment your pseudocode. Main Write "What is the room one's length in feet?" Declare length1 As Float Input length1 Write "What is the room one's width in feet?" Declare width1 As Float Input width1 Declare area1 As Float Set area1 = width1 * length1 Write "What is the room two's length...

Words: 495 - Pages: 2

Premium Essay

Cmis Hw1

...definition: Calculate the usable area in square feet of a house. Assume that the house has a maximum of four rooms, and that each room is rectangular. A. Problem Analysis – Desired Output: The sum of the two integers Required Input: 2 integers. a and b Calculations: A*B=C B. Program Design – This program will sum two integer numbers to receive a third integer number. //Declare variables Declare a,b,c as Integer // Set values of Integers Set a= Set b= Set c=a+b // Print c Print a,b,c C. Program Comments and Test Data – Following the directions in the assignment, include your test data and expected results in this section. (The Comments section is for specifics about how you designed your program, any problems you had, how you solved them, lessons learned, and how you would improve the program if you had more time. This is normally used by programmers who may come back to the program later.) Table 1. Include your test data table here. Show at least 3 examples sets of test data. Test data is normally designed before the program is written. It is used after the program is completed to test and ensure it works as it was designed to work. |Test Case # |Input |Expected Output | |1 |Room1: length=20, width=14; |718 square feet ...

Words: 348 - Pages: 2