Free Essay

Submitted By pickle

Words 294

Pages 2

Words 294

Pages 2

Problem Analysis

In this Program , the aim is to calculate the square feet of a 4 –room house

So we need to know each rooms length and breadth , then calculate each rom’s area and the find the sum of those

Area of Room1=length1*breadth1

Area of Room2=length2*breadth2

Area of Room3=length3*breadth3

Area of Room4=length4*breadth4

Total Number of Square Foots = Area of Room1+ Area of Room2+ Area of Room3+ Area of Room4

Program Design

Pseudocode

Start

Declare the variables i,j as interger length[4], breadth[4],area[4] as double array sum as double

Display “Enter the Rooms length and Breadth”

For i= 1 to 4 do Accept length[i], breadth[i]

Next i

Display “Finding Area and total number of square foots”

Set sum=0

For i= 1 to 4 do Area[i]= length[i]* breadth[i] Sum=sum+Area[i]

Next i

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 i,j; double length[4], breadth[4] ,area[4], sum;

cout<<"\nEnter the length and breadth of each room"; for (i=0;i<4;i++)

{

cout<<"\nRoom "<<i+1<<" Length :"; cin >>length[i]; cout<<"\nRoom "<<i+1<<" Breadth :"; cin >>breadth[i];

}

sum=0; for (i=0;i<4;i++)

{

area[i]=length[i]* breadth[i]; sum=sum+area[i];

}

cout<<"\nTotal number of square foots :"<<sum<<endl;

return 0;

}

Test data and Output

Free Essay

...Program that will calculate the number of square feet (living space) in a 4-room house. Problem Analysis In this Program , the aim is to calculate the square feet of a 4 –room house So we need to know each room’s length and breadth, then calculate each room’s area and the find the sum of those Area of Room1=length1*breadth1 Area of Room2=length2*breadth2 Area of Room3=length3*breadth3 Area of Room4=length4*breadth4 Total Number of Square Foots = Area of Room1+ Area of Room2+ Area of Room3+ Area of Room4 Program Design Pseudocode Start Declare the variables i,j as interger length[4], breadth[4],area[4] as double array sum as double Display “Enter the Rooms length and Breadth” For i= 1 to 4 do Accept length[i], breadth[i] Next i Display “Finding Area and total number of square foots” Set sum=0 For i= 1 to 4 do Area[i]= length[i]* breadth[i] Sum=sum+Area[i] Next i Display “Total number of square foots”, sum Stop Program Comments and Test Data Test data and Output Example application test data: Input: Room length and width (in feet) Expected output: Total square footage of house (in square feet) Room1: length=10, width=14; Room 2: length=9, width=10; Room 3: length=12, width=12; Room 4: length=11, width=9 473 Room1: length=20, width=10; Room 2: length=15, width=10; Room 3: length=20, width=10; Room 4: length=30, width=10 850 Room1: length=20, width=15; Room 2: length=10, width=5; Room 3:......

Words: 276 - Pages: 2

Premium Essay

...| Profit margin:Net profitNet sales | 15,348,79253,123,159=28.89% | 5,841,52424,311,065=24.03% | 27,370,60996,184,171=28.46% | Current ratio:Current assetsCurrent liabilities | 21,016,4198,517,304=2.47 | 21,217,2537,165,503=2.96 | 32,445,99428,654,074=1.13 | Return on assets:Net incomeAvg total assets | 15,348,79221,750,340=70.57% | 5,841,52421,682,474=26.94% | 27,370,609492,433,648=5.56% | Table 1.1 *Capital charged= (WACC X Average Invested Capital) Based on the Table1.1, we have decided that Marine Corp Sdn Bhd has the best financial performance compare with others two subsidiaries; Sungai Emas Port Sdn Bhd and Green Port Sdn Bhd. Even Green Port has the larger profit based but actually the company has destroy value if we calculate with the Value Based Management (VBM) as requested by the group SURIA. The value was destroy maybe because of the net operating profit was include the higher dredging cost that has been spend which is the amount that General Manager Green Port, Anita Osman want to amortise the cost to ensure that the company gain profit. Moreover, the Green port also had financial charges while the other two companies did not have financial charges. In fact, the amount for profit based and economic earnings is differ where the amount of profit decrease. In term of ratio, profit margin shows that Marine Corp is the higher percentage which 28.89% and follow by Green Port. However, Sungai Emas Port has lower profit margin, 25.03% but the company has......

Words: 2301 - Pages: 10

Free Essay

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

Words: 478 - Pages: 2

Premium Essay

...Apartment Living Vs. Living in a House At some point in everyone’s life they are faced with the decision of choosing where they want to live. This can be a very difficult decision to make. Depending on the lifestyle you have or are wanting, there are many options. The first thing that you need to decide is what type of housing suits your needs and preferences. In the world we live in today you can choose from the convenience of an apartment or the freedom of a house. There are several advantages and disadvantages to both of them. Let us begin with the size of property you are looking for. Apartments can vary in size, they are built to please families and single people. Efficiency apartments are good for those who are not needing a lot of space. They are typically very compact and fit an entire apartment in just one room. If this is not for you and maybe you have a family, you can get an apartment with up to three bedrooms and two bathrooms. On the other hand, if you would prefer a house, they too vary in size. With a house you have more options on the amount of bedrooms you can choose from. There are houses available from only one bedroom and up to as many as you need. The size of the rooms are also a factor that you need to consider. The two main differences between the size of an apartment and the size of a house, are the sizes of the kitchen and the bathrooms. These rooms are much smaller in most apartments than they are in a house. All though they are still just as...

Words: 1037 - Pages: 5

Free Essay

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

Words: 472 - Pages: 2

Free Essay

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

Words: 497 - Pages: 2

Premium Essay

...INTRODUCTION The “Microsoft’s Battle for the Living Room: The Trojan Horse-The Xbox” case talks about the well known Microsoft Corporation as a large organization ($32 billion revenue and $10 billion profits in fiscal year 2003) which is operating in the video game console industry, and also case provides information about video game console industry and Microsoft’s competitors Sony and Nintendo in that industry. The status of the company was examined in detail by the case and a number of problems were revealed. This paper is based on the information provided by the case and is divided into four sections. The first section contains the SWOT analysis of Microsoft Corporation, the second section discusses the problems of the company in the industry, the third section offers alternatives and recommendations to solve the stated problems, and the fourth SWOT Analysis Strengths of Microsoft Corporation: Technological improvements have been growing since the earth born, but it has been realized by people when it came to their home. Because most of the things became computerized in these days, when we call technology, PC’s at our home or office comes to our mind first. Microsoft’s Windows series are globally known as the PC desktop operating system with a market share of above 80%, so we can say that Microsoft has a good reputation and market share. Since most computers that we are using comes with a built in Windows operating system, Microsoft’s customer retention is one of......

Words: 437 - Pages: 2

Free Essay

...Ten Years in Just 89 Square Feet Jay Shafer and the Tiny House Movement by Antony Taylor For ten years, Jay woke up every morning to his bedroom ceiling, just 3' away from his face. After climbing down from his loft bed into his 6' x 6 ½' living room, he would enter his 4' x 2' bathroom. To most people, Jay would appear to be a prisoner, and the conditions might appear inhumane, yet Jay is not a prisoner, nor has he been forced into these living conditions. In fact, Jay not only chose to live in such a small space, he designed it himself! Jay's house for ten years, the “Epu” is the size of a walk-in closet in most of today's homes, yet it contains a living room, desk, fully functioning kitchen, separate bathroom, and loft bed space. Jay Shafer is the owner of the Tiny Tumbleweed House Company, founder of the Small House Society, an ecological activist, a new-era architect, and a lifestyle revolutionary. His minimalist lifestyle design has been featured in The New York Times, The San Francisco Chronicle, The Wall Street Journal, and Time Magazine. He and his tiny house has been featured on “CNN”, “Oprah”, “This Old House” and countless local news stations. Around the country, people are purchasing his designs, attending his workshops, and following his revolutionary example of how to live life with less space and less possessions, resulting in less of a drain on resources and the environment. A Mixture of Motivations Today's economy suffers in part due...

Words: 1653 - Pages: 7

Free Essay

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

Words: 905 - Pages: 4

Free Essay

...1/23/2015 Program Description: The objective of this program is to calculate the square footage of a house with up to 3 rooms. The program will ask the user to enter the width and length of each room in feet. The expected output will multiplying the length and width of each room and then summing the square footage of each room to yield the total square footage of the house. Program name: House Square Footage calculator Analysis: We will use sequential statements All variables will be float We will define these variables: Total_SqFt Room_1_L Room_2_L Room_3_L Room_1_W Room_2_W Room_3_W Input: The user will be prompted to enter the room dimension for each room individually (up to three rooms) “Enter Length and Width of room 1” “Enter Length and Width of room 2” “Enter Length and Width of room 3” Ouput: The output will be defined as the total square footage of the house and will use the input provided by the user to calculate output with this formula: The Square footage of the house will be calculated by this formula: SqFt = (Room_1_L x Room_1_W) + (Room_2_L + Room_2_W) + (Room_3_L x Room_3_W) The output message will display a message “Total Square foot of the house is: SqFt” Test Plan Three test cases will be done Test Case # | Input | Expected Output | 1 | Room1: length=10, width=14; Room 2: length=9, width=10; Room 3: length=12, width=12; | 374 square feet | 2 | Room1: length=5, width=9; Room 2: length=15, width=20; Room 3: length=6,...

Words: 850 - Pages: 4

Free Essay

...LIVING BY NUMBERS Question 1 Determine the economic earnings of MarineCorp Sdn. Bhd., Green Port Sdn. Bhd and Sungai Emas Port Sdn. Bhd. | Economic Earnings | MarineCorp Sdn Bhd | RM 14,274,611 | Green Port Sdn Bhd | RM (14,588,232) | Sungai Emas Port Sdn Bhd | RM 5,030,563 | Green Port will have negative economic earnings and the other two will have positive economic earnings. Positive Earnings = provides higher return than the cost of capital Negative Earnings = the value of the company was destroyed and investment should be avoided from this company because it indicates that the company failure to provide higher returns than the cost of capital. Question 2 Rank the companies in terms of their performance. We divided the companies’ performances into two categories which are based on Value Based Management (VBM) and based on profits. | VBM | Profit | MarineCorp Sdn Bhd | 1st | 2nd | Green Port Sdn Bhd | 3rd | 1st | Sungai Emas Port Sdn Bhd | 2nd | 3rd | VBM MarineCorp ranked 1st because Economic Eearnings = RM 15,128,910 – RM 854,306 = RM 14,274,611 Sungai Emas ranked 2nd because economic earnings = RM 5,218,364 – RM 187,801 = RM 5,030,563 Green Port ranked 3rd because economic earnings = RM 31,381,168 – RM 45,969,400 = RM (14,588,232) PROFIT Green Port ranked 1st because profit = RM 27,370,609 MarineCorp ranked 2nd because profit = RM 15,348,792 Sungai Emas ranked 3rd because profit = RM 5,841,......

Words: 1090 - Pages: 5

Free Essay

...Utilization of Under-Utilized Hotel Rooms Inventory as Executive Serviced Office Space Jeffrey R. Victor, CHA, CHE, CHS, CMP Fairleigh Dickinson University Author Note Correspondence concerning this paper should be addressed to: Jeffrey R. Victor, CHA, CHE, CHS, CMP Fairleigh Dickinson University, Madison, NJ 07940. Contact: jvictor@jeffreyvictor.com Analysis of Repurposing Underutilized Hotel Rooms Inventory as Executive Office Space 1 Abstract When hotels are built, the number of rooms built into inventory becomes a static item. Due to the physical nature of construction, the number of rooms become an inflexible and perishable commodity. In looking at the growing nature of the Executive or Serviced Office industry and the similarities between their product and a hotel’s offerings, it has been theorized that there are revenue opportunities in deploying a serviced office product in pre-existing hotels. Through an analysis of industry trends, demand for offices, product needs and revenue opportunity, a financial model has been developed. After reading this paper, the reader will be able to understand what a serviced executive office is, the similarities between that product and a hotel product and understand how to analyze revenue to determine the financial impact of repurposing a number of rooms as executive offices. They will then be able to utilize the model contained herein to determine if repurposing rooms in such a manner would work in......

Words: 8026 - Pages: 33

Free Essay

...04/01/2012 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 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=......

Words: 643 - Pages: 3

Free Essay

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

Premium Essay

...Running Head: POVERTY IN AMERICA The Effects of Poverty on Millions Americans and New faces of Poverty & Possible Prevention Clara M Jones Strayer University Instructor: Dr. Astiage Tondari Economics of Social Issues ECO405009VA016-1124-001 June 9, 2012 Abstract When a person think of poverty, one simply says’ and or think that individuals, families, groups, and what have you lack financial stability; however, there is so much more that should be considered when it comes to poverty. The World Health Organization has described poverty as the greatest cause of suffering on earth. Living in a state of financial instability is both physically and emotionally damaging, the stress alone can make one ill. Poverty continues to be a problem not only in the United States of America but in developing countries and less developed countries (LDC) worldwide. Some of those countries are under developed countries and developing countries; furthermore, there are major problems in both. The main focus in this paper is on poverty in America; also, the new faces of poverty and how it affects the new faces. . Four Families of Article from USA TODAY, September 28, 2011 The article covers various issues of poverty of different families and individuals; however, the main portion of the article is about a father in Leesburg, Virginia. The man’s name is Billy Schlegel. He is the father of three children; also, he is divorced as of 2004. Billy and his ex-wife share......

Words: 5570 - Pages: 23