Free Essay

Usable Area in Square Feet

In:

Submitted By saintjonasam
Words 497
Pages 2
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.
Description:
The program first accepts the number of rooms. Then for each room the dimensions are taking (Length and Width). With all the dimensions recorded for each room, Area is calculated as Length by Width, using the formula for area calculation of a rectangle (Length*Width). The final unused area is the sum of all the areas from the number of room specified.
Analysis:
The number of rooms will be held in a variable N, Length and Width for each room will be held in LN and WN respectively. With N representing the room number. AreaTotal and AreaTemp are used to hold the final area values and the temporal values of area for each room respectively. To keep track of which room’s dimension or area is being dealt with, the variable Count will be used.
Variables to use: 1. N : Number of Rooms 2. Count : Count for loop 3. AreaTemp: Temporal area 4. AreaTotal : Total area 5. LN : Length of Room number N 6. WN: Width of Room number N B. Program Design – Following the directions in the assignment, clearly write up your problem design in this section and comment your pseudocode.
Pseudo Code: 1. Enter the number of rooms : N 2. Set Count = 0 3. If Count < N a. For Count < Number of Rooms // if count is less than the number of rooms i. Enter Dimension for Room number : Count +1 // ii. Lcount +1 , Wcount+1 iii. Count = Count + 1 // Increment count by 1. 4. Area Calculation 5. Set Count = 0 6. Set AreaTemp = 0 7. Set AreaTotal = 0 8. If Count < N b. For Count < Number of Rooms // if count is less than the number of rooms iv. AreaTemp = Lcount +1 x Wcount+1 v. AreaTotal = AreaTotal + AreaTemp vi. Count = Count + 1 // Increment count by 1. 9. Total Unused Area = AreaTotal

C. Program Comments and Test Data – Following the directions in the assignment, include your test data and expected results in this section.

Test Cases: 1. Room Number = 2 , a. Room 1 : Length1 = 20, Width1 = 20 , b. Room 2 : Length1 = 22, Width1 = 10 c. Output = (20*20) +(22*10) = 620 2. Room Number = 1 d. Room 1: Length1 = 10, Width1 = 40 e. Output = (10*40) = 400 3. Room Number = 3 f. Room 1 : Length1 = 9, Width1 = 2 g. Room 2 : Length2 = 5, Width2 = 6 h. Room 3 : Length3 = 2, Width3 = 18
Output: (9*2)+(5*6)+(2*18) = 84

Table 1.

TEST CASE # | INPUT | EXPECTED OUTPUT | 1 | Room 1: Length1=20, Width1=20Room 2: Length2=22, Width2=10 | 620 | 2 | Room 1: Length1=10, Width1=40 | 400 | 3 | Room 1: Length1=9, Width1=2Room 2: Length2=5, Width2=6Room 3: Length3=2, Width3=18 | 84 |

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.

...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...

Words: 478 - Pages: 2

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

...CMIS102 Homework Assignment 1 Student Name: Abel Patrick Assizo Class/Section: CMIS 102 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...

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.

...Neal Fowler Class/Section: CMIS 102 Section 6385 Professor Name: Marie Arvi Assignment due date: 6 January 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: 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 //...

Words: 472 - Pages: 2

Free Essay

Assignment1

...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 the usable area...

Words: 273 - Pages: 2

Free Essay

Cmis 102 Homework 1

...the square feet of usable space in each individual room and those values will be added together to get the total usable area of square feet in house with length and width values of up to four rooms being the only known value BEGIN define variables for rooms and total usable space room numbers and area of each room will be will be represented by integers r1 through r4 total usable area in the house will be represented by Usable_space which define variables of length and width for r1-r4, integer l1,l2,l3,l4,w1,w2,w3,w4 //the values for length and width will be added by user input l1,w1,l2,w2,l3,w3,l4,w4 //Length will be known as L and will have the integers of L1 through L4. L1through L4 will correspsond to the the integer “L” with the same number //Width will be known as “W” and will have the integers of w1 through w4 with the numbers corresponding to the integer “w” with the same number r1=L1*w1; r2=L2*w2; r3=L3*w3; r4=L4*w4; define formula to get total usable square feet Usable_space=(r1+r2+r3+r4); Have program show with printf command Usable square feet for each room and total usable square feet: “ The individual rooms r1-r4’s (respectively) usable area in square feet is r1,r2,r3,r4. The total usable square feet of your house with those given values is Usable_space.” END Code and run test cases. If successful code is good to go. Test case # Input Expected Output 1 Room1:L-10 W-4 Room2:L-5 W-2 Room3:L-3 W-7 Room4:L-25 W-2 121 sq feet 2 Room1:L-25...

Words: 354 - 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 -To find...

Words: 776 - Pages: 4

Free Essay

Intro to Programming

...calculate total usable area of a house by summing the square feet of rectangular rooms. This requires inputs in the form of length and width dimensions of each room to find the area of each room then adding those numbers together to find the area of all rooms. The results will be the output in area of each room and the total area of all the rooms. Analysis: The area of each room is found using the equation Area=Length x Width. The output in total square feet is found by summing the output of the individual rooms. L = Length of room W = Width of room Area= (L) * (W) R1 = Room 1, L1 * W1 R2 = Room 2, L2 * W2 R3 = Room 3, L3 * W3 Define 3 integer numbers as area of each room: R1, R2, R3 Usable area will store the sum in total square feet of R1, R2, R3 Test Plan The following input is required for testing: Test Case 1: R1: L = 10, W = 12, L*W = 120 R2: L = 10, W = 10, L*W = 100 R3: L = 12, W = 12, L*W = 144 Usable Area: R1 + R2 + R3 = 364 square feet Test Case 2: R1: L = 10, W = 12, L*W = 120 R2: L = 11, W = 11, L*W = 121 R3: L = 12, W = 12, L*W = 144 Usable Area: R1 + R2 + R3 = 385 square feet Pseudocode // This program will add together the square feet of rooms to determine the total square feet of a house. // Declare variables Declare R1, R2, R3, Usable Area as Integer // Set values of Integers //The values for R will be found using L x W for each Room Set R1 = 120 Set R2 = 100 Set R3 = 144 Set usable = R1+R2+R3 ...

Words: 317 - Pages: 2

Premium Essay

Rentable Square Feet: Understanding The Common Area Factor

...Usable vs Rentable Square Feet: Understanding the Common Area Factor Why pay rent for more space that you do not fill? The measurement of office space square footage for rent purposes is a commercial real estate concept that is commonly misunderstood by tenants and real estate professionals alike. The usable square footage, along with the tenant’s proportionate share of common areas in the building are factored in to determine the amount of rent in most office leases. For this reason, it is important for you to understand the difference between usable and rentable square footage along with the common area factor before you sign the bottom line. You want to know what you are going to be paying for and how much space you are actually going to...

Words: 739 - Pages: 3

Free Essay

Create a Program to Calculate Total Usable Area of a Four Bedroom House

...Description: This program will calculate the usable area in square feet of a four bedroom house. Analysis: In building this program, I need it to efficiently calculate the total usable area of an entire four bedroom house. In order to do this, the program first needs to calculate the dimensions of each room. Once it has found the total area for each room, the program can then add the four room dimensions to arrive at the total usable area for the entire house. The calculations should look like this: Total usable area = (l*w) + (l*w) + (l*w) + (l*w) Rm. 1 Rm. 2 Rm. 3 Rm. 4 When I first started planning this program, I gave the room variables the names living_room, kitchen, bedroom1, and bedroom2. However, it became confusing trying to match these variables with the names of the dimension variables. Instead, I gave each room a number and the dimension variables have a corresponding number (for example, room1, length1, width1 and room2, length2, width2). Variables: * room1: total usable area of room number one * length1: length of room number one * width1: width of room number one * room2: total usable area of room number two * length2: length of room number two * width2: width of room number two * room3: total usable area of room number three * length3: length of room number three * width3: width of room number three * room4: total usable area of room number four * length4: length of room number four ...

Words: 905 - Pages: 4

Free Essay

Cmis 102 Assignment 1

...calculation to determine the square feet of 4 rooms in a house. It will then sum the square feet of all 4 rooms to find the total usable area of a house. Given all rooms are rectangular Analysis: The area of a room can be determined by a simple math equation of Area=Length x Width. Because we are creating a program to calculate square feet, the program will require an input and output. First thing we have to do is figure out the dimensions of the rooms. Then, we must plug in the dimensions to the appropriate variables. Afterwards, we sum all of the variables together to find the total usable area of the house. The following is the formula to determine the square feet of each room L = Length W = Width Room1 = L1 * W1 Room2 = L2 * W2 Room3 = L3 * W3 Room4 = L4 * W4 Total area = Room1+Room2+Room3+Room4 Test/Pseudo code: Test Case # | Input | Expected Output | 1 | Room1: L=12, W=12 Room2: L=10, W=11Room3: L=15, W=15Room4: L=13, W=14 | 661 square feet | 2 | Room1: L=11, W=13 Room2: L=13, W=12Room3: L=16, W=14Room4: L=11, W=11 | 644 square feet | 3 | Room1: L=13, W=12 Room2: L=13, W=13Room3: L=14, W=15Room4: L=12, W=13 | 691 square feet | Pseudo code: //this program sums the square feet of 4 rooms to determine the total usable square feet of a house //declaration of variables //declare room 1, room 2, room 3, room 4 as integer //design Set room 1 = L1*W1 Set room 2 = L2*W2 Set room 3 = L3*W3 Set room 4 = L4*W4 Set total area = room 1 + room 2 + room 3 +...

Words: 304 - Pages: 2

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

Free Essay

Assignment1

...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 = square foot...

Words: 928 - Pages: 4

Free Essay

Programing

...the usable square feet for a house with a maximum of four rooms with different measurements that a user can input in order to get the output of usable square feet. I will explore the steps on how to exactly figure out the square feet of each room and then the square feet of the house. I will also create three sets of test data that we will use to include the inputs and the expected output of each test case. At the end of it all, I will provide the pseudocode of my overall design. In this step, I will need to figure out how to exactly calculate the square feet or area of a rectangle. With a little refresher in math I found the formula A = L * W or L * W = A, where A is the area, L is the length, W is the width, and * simply means to multiply. Here is an example of the calculation of room 1; we will give L a value of 30 ft. and W a value of 20 ft. giving us 30 * 20 = A. Now that we know the values of L and W we can find the value of A by multiplying L by W, giving us 30 * 20 = 600 sq. ft. So in room 1 we have 600 square feet. Using the above formula we can go two different routes with our calculations. One way is to have the user input the total length of all rooms added together and doing the same with the width of the rooms. This would have the program only have two inputs and one output. The other way would be to have the user input the values of the rooms’ length separately and again the same with the widths. Either way gives the same output as the total usable square...

Words: 446 - Pages: 2

Free Essay

Calculate Square Footage

...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 Calculations: ...

Words: 643 - Pages: 3