Free Essay

# House Square Footage Calculator

In:

Submitted By marvin1030
Words 850
Pages 4
Homework Assignment # 1
Marvin Sankar
CMIS102
Professor Khattab A.
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, width=12; | 417 square feet | | | 3 | Room1: length=8, width=11;
Room 2: length14, width=24;
Room 3: length=6, width=9; | | 478 square feet | |

Psuedocode:
Main Module
//Created by Marvin Sankar
//CMIS102
// Program name: House Square Footage Calculator
//Instructor Khattab A.
//The program will ask the user to enter the width and length of each room in feet (up to three rooms) which will calculate the square footage of each room and then sum of each room to yield the total square footage of the house.
Declare all variables as float: Total_SqFt, Room_1_L, Room_2_L, Room_3_L, Room_1_W, Room_2_W, Room_3_W,
Write “Enter Length and Width of room 1”
Input Room_1_L
Input Room_1_W
Write “Enter Length and Width of room 2”
Input Room_2_L
Input Room_2_W
Write “Enter Length and Width of room 3”
Input Room_3_L
Input Room_3_W
Set Total_SqFt = (Room_1_L * Room_1_W) + (Room_2_L * Room_2_W) + (Room_3_L * Room_3_W)
Write “Total square footage of the house is “ + Total_SqFt
End Main

C Code
//Created by Marvin Sankar
//CMIS102 1.24.2015
//Instructor Khattab A.
// Program: House Square Footage Calculator
// The program will ask the user to enter the width and length of each room in feet (up to three rooms) which will calculate the square footage of each room and then sum of each room to yield the total square footage of the house.
#include <stdio.h> int main ()
{
/* variable definition: */ float Total_SqFt, Room_1_L, Room_2_L, Room_3_L, Room_1_W, Room_2_W, Room_3_W; /* variable initialization */ printf("Enter Length and Width of room 1 in feet:\n"); Room_1_L = 10; Room_1_W = 14; printf("Enter Length and Width of room 2 in feet:\n"); Room_2_L = 9; Room_2_W = 10; printf("Enter Length and Width of room 3 in feet:\n"); Room_3_L = 12; Room_3_W = 12; Total_SqFt = (Room_1_L * Room_1_W) + (Room_2_L * Room_2_W) + (Room_3_L * Room_3_W); printf("Total square footage of the house is: %f \n", Total_SqFt); return 0;
}
Results of tests 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, width=12; | 417 square feet | 3 | Room1: length=8, width=11;
Room 2: length14, width=24;
Room 3: length=6, width=9; | 478 square feet |

Test case 1-PASS
 Success time: 0 memory: 2052 signal:0 Enter Length and Width of room 1 in feet: Enter Length and Width of room 2 in feet: Enter Length and Width of room 3 in feet: Total square footage of the house is: 374.000000 Test case 2-PASS
 Success time: 0 memory: 2008 signal:0 Enter Length and Width of room 1 in feet: Enter Length and Width of room 2 in feet: Enter Length and Width of room 3 in feet: Total square footage of the house is: 417.000000

Test case 3-PASS
 Success time: 0 memory: 2008 signal:0 Enter Length and Width of room 1 in feet: Enter Length and Width of room 2 in feet: Enter Length and Width of room 3 in feet: Total square footage of the house is: 478.000000

Example of Fail test
For Room_3_W I entered “p” as the input. Below demonstrates that since the variable is declared an integer it won’t accept a character, only numbers.
 Compilation error time: 0 memory: 2052 signal:0 prog.c: In function 'main': prog.c:16:14: error: 'p' undeclared (first use in this function) Room_3_W = p; ^ prog.c:16:14: note: each undeclared identifier is reported only once for each function it appears in

### Similar Documents

Free Essay

#### Cmis102 Hw1

...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 the total area of the house I need...

Words: 776 - Pages: 4

#### Buying or Renting: Which Is Better for You?

...either rent or buy. It is important to carry out a thorough investigation on each of the options and make an informed decision. The decision of buying or renting any asset is crucial and should be critically analyzed. Therefore, it is important for one to take into account the benefits and costs involved in each option before deciding on the one to take. One might choose to use a buy vs rent comparison tool such as the mortgage calculator that can be provided by a lender or real estate broker. The Rent versus Buy Comparator allows the user to compare their estimated financial position after 7 years of renting with their estimated financial position after 7 years of home loan repayments (Realtor.com, n.d.). This tool will allow the buyer or renter to compare the possible financial cost and assists in making the decision whether to buy or rent. Moreover, most finance calculators will take into consideration the rent, rent insurance, expect inflation rate, price of home, down payment, all fees associated with buying. Moreover, the financial calculator will include any home owner’s fees, annual property tax rate, realtor commission rate, and number of years expected to stay at the property. Depending on which area of the country the person or persons are looking at, will eventually determine the amount of rent or mortgage they...

Words: 1600 - Pages: 7

#### Tower 400 Final Project Proposal

...rainwater collection system, through research we have found a company that has already been involved with many business remodeling, and has given the search for an effective water harvesting and much needed expressway. The company is BRAE among there mass amount of information about rainwater harvesting they also have an app that allows you to input the square footage of the roof you are attempting to use, and estimate, with average rainfall for the area, the amount of water one could possible collect and save. With this calculator we have found that, the roof of Tower 400, could annually collect and store approximately, 375,303 Gallons of water. With the current water rates in Detroit that would amount to a savings of \$1,052 yearly. (I have re-sent the request for estimates by this company, but they still haven’t gotten back to me) The above graphic represents the outline of Tower 400 and the estimated usable roof (20953 sqft), in which can collect the rainwater. After going through all of our research we have found that the best way to reduce the amount of water wasted by Tower 400, would be not only prevention, through in house utilities but in tandem installing rainwater harvesting infrastructure. This will allow the tower to fully make use of the natural resource that it would any another situation continue to be ignored. The LEED Certification points that can possibly be earned through the reduction of water waste, keeps in the bounds of the ultimate goal to the proposal...

Words: 786 - Pages: 4

#### Quantitative Analysis for Management Chapter 4

...Teaching Suggestion 4.2: Statistical Correlation Does Not Always Mean Causality. Students should understand that a high R2 doesn’t always mean one variable will be a good predictor of the other. Explain that skirt lengths and stock market prices may be correlated, but raising one doesn’t necessarily mean the other will go up or down. An interesting study indicated that, over a 10-year period, the salaries of college professors were highly correlated to the dollar sales volume of alcoholic beverages (both were actually correlated with inﬂation). Teaching Suggestion 4.3: Give students a set of data and have them plot the data and manually draw a line through the data. A discussion of which line is “best” can help them appreciate the least squares criterion. Teaching Suggestion 4.4: Select some randomly generated values for X and Y (you can use random numbers from the random number table in Chapter 15 or use the RAND function in Excel). Develop a regression line using Excel and discuss the coefﬁcient of determination and the F-test. Students will see that a regression line can always be developed, but it may not...

Words: 3989 - Pages: 16

Free Essay

#### Child Care

...Opening a Quality Child Care Center A resource guide for starting a business and planning a child care center. Table of Contents: Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 First Steps: Assessment, Market Analysis, Business Plan and Child Care Licensing . . . . . . . . . . . . . . . . . . . . . . . . . 3 Finding Your Facility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Design Considerations and Process . . . . . . . . . . . . . . . . . 8 Program Administration and Curriculum . . . . . . . . . . 17 Appendix A: Timeline for Start-up . . . . . . . . . . . . . . . . . . . . . . . . . 19 Appendix B: Agencies and On-line Resources . . . . . . . . . . . . . . . . 20 Appendix C: Resources for Developing Polices/Procedures . . . . . 22 Appendix D: Classroom Equipment and Materials List . . . . . . . . 23 Appendix E: Care About Childcare Criteria . . . . . . . . . . . . . . . . . . . 24 Appendix F: Structural Rules from Licensing . . . . . . . . . . . . . . . . .27 Appendix G: Accreditation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Appendix H: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 State of Utah, Department of Workforce Services, Office of Child Care © 2012 Opening a Quality Child Care Center Introduction THE BUSINESS OF CHILD CARE Welcome to the world and work of child care! The purpose of this manual is to provide a prospective child care center...

Words: 14149 - Pages: 57

#### Statistics Cheat Sheet

...Statistic- is a number computed from a sample of data. It is characteristic of a sample. A summary measure that is computed from a sample to describe a characteristic. (Numerical summary of the population) (Ex. The proportion of females randomly selected from the registered voters of a county or the average time it takes for the first 5 students to complete an exam) Parameter- A characteristic (numerical summary) of the entire population. A number computed from the entire population usually unobservable. Subject- the entities that we measure in a study. Population- the collection of all subjects under study. Proportion- of the observations that fall in a certain category is the frequency (count) of observations in that category divided by the total number of observations. Proportion and percentages (aka relative frequencies) Probability- the chance that an even will occur. Sample- a subset of the population. Random Samples are most valid. Design- Plan for how the data will be collected. Two events are dependent if the outcome or occurrence of the first affects the outcome or occurrence of the second so that the probability is changed. Sample Space- set of all possible outcomes for a random phenomenon Variables (COLUMNS)- characteristics or measurements on the subject. Event-subset of the sample space Description- summarizing the data that are obtained. Descriptive Statistics- methods for summarizing the data. Usually consists of bar graphs and...

Words: 12484 - Pages: 50

#### Ca Exam Prep

...California EXAM PREP The SMART Guide to Passing Kor Real Estate California Real Estate Exam Prep: The SMART Guide to Passing Cengage Learning Vice President/Editor-in-Chief: Dave Shaut Executive Editor: Scott Person Acquisitions Editor: Sara Glassmeyer Senior Marketing Manager: Mark Linton Manager of Technology, Editorial: John Barans Frontlist Buyer, Manufacturing: Kevin Kluck Art Director: Bethany Casey Content Project Manager: D. Jean Buttrom Production Service: Pre-Press/PMG-India Cover Designer: Pop Design Works, www.popdesignworks.com Cover Images: © Getty Images © 2009 Cengage Learning ALL RIGHTS RESERVED. No part of this work covered by the copyright hereon may be reproduced or used in any form or by any means—graphic, electronic, or mechanical, including photocopying, recording, taping, Web distribution, information storage and retrieval systems, or in any other manner—except as may be permitted by the license terms herein. For product information and technology assistance, contact us at Cengage Learning Customer & Sales Support, 1-800-354-9706 For permission to use material from this text or product, submit all requests online at www.cengage.com/permissions Further permissions questions can be emailed to permissionrequest@cengage.com Library of Congress Control Number: 2008926512 Student Edition ISBN 13: 978-0-324-64498-2 Student Edition ISBN 10: 0-324-64498-1 Student Edition with CD ISBN 13: 978-0-324-64497-5 Student Edition with CD ISBN 10: 0-324-64497-3...

Words: 64373 - Pages: 258

#### Real Estate Finance Textbook

Words: 80543 - Pages: 323

#### Finance Textbook

Words: 128112 - Pages: 513

#### Statistics

...A SECOND COURSE IN STATISTICS REGRESSION ANALYISIS Seventh Edition William Mendenhall University of Florida Terry Sincich University of South Florida Prentice Hall Boston Columbus Indianapolis New York San Francisco Upper Saddle River Amsterdam Cape Town Dubai London Toronto Madrid Delhi Milan Mexico Munich City Sao Paris Paulo Montreal Sydney Hong Kong Seoul Singapore Taipei Tokyo Editor in Chief: Deirdre Lynch Acquisitions Editor: Marianne Stepanian Associate Content Editor: Dana Jones Bettez Senior Managing Editor: Karen Wernholm Associate Managing Editor: Tamela Ambush Senior Production Project Manager: Peggy McMahon Senior Design Supervisor: Andrea Nix Cover Design: Christina Gleason Interior Design: Tamara Newnam Marketing Manager: Alex Gay Marketing Assistant: Kathleen DeChavez Associate Media Producer: Jean Choe Senior Author Support/Technology Specialist: Joe Vetere Manufacturing Manager: Evelyn Beaton Senior Manufacturing Buyer: Carol Melville Production Coordination, Technical Illustrations, and Composition: Laserwords Maine Cover Photo Credit: Abstract green ﬂow, ©Oriontrail/Shutterstock Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and Pearson was aware of a trademark claim, the designations have been printed in initial caps or all caps. Library of Congress Cataloging-in-Publication Data Mendenhall, William. A second course in...

Words: 63698 - Pages: 255

#### Berk Demarzo

...FUNDAMENTALS OF Corporate Finance SECOND EDITION This page intentionally left blank FUNDAMENTALS OF Corporate Finance SECOND EDITION Jonathan Berk STANFORD UNIVERSITY Peter DeMarzo STANFORD UNIVERSITY Jarrad Harford UNIVERSITY OF WASHINGTON Prentice Hall Boston Columbus Indianapolis New York San Francisco Upper Saddle River Amsterdam Cape Town Dubai London Madrid Milan Munich Paris Montreal Toronto Delhi Mexico City Sao Paulo Sydney Hong Kong Seoul Singapore Taipei Tokyo The Prentice Hall Series in Finance Alexander/Sharpe/Bailey Fundamentals of Investments Bear/Moldonado-Bear Free Markets, Finance, Ethics, and Law Berk/DeMarzo Corporate Finance* Berk/DeMarzo Corporate Finance: The Core* Berk/DeMarzo/Harford Fundamentals of Corporate Finance* Bierman/Smidt The Capital Budgeting Decision: Economic Analysis of Investment Projects Bodie/Merton/Cleeton Financial Economics Click/Coval The Theory and Practice of International Financial Management Copeland/Weston/Shastri Financial Theory and Corporate Policy Cox/Rubinstein Options Markets Dietrich Financial Services and Financial Institutions: Value Creation in Theory and Practice Dorfman Introduction to Risk Management and Insurance Dufey/Giddy Cases in International Finance Eakins Finance in .learn Eiteman/Stonehill/Moffett Multinational Business Finance Emery/Finnerty/Stowe Corporate Financial Management Fabozzi Bond Markets: Analysis and Strategies Fabozzi/Modigliani Capital Markets: Institutions...

Words: 195133 - Pages: 781

#### Accounting

Words: 209552 - Pages: 839

#### Accounting for Decision Making and Control

Words: 209552 - Pages: 839

Free Essay

#### Chapters

...GM614 Global Advertising Professor Christin Walth Jenessa Carder, Chia-Ying Chen, Fango Lin, Yi-Hsuan Su, Ya-Ling (Claire) Wang, Winette Yee May 5, 2010 Swatch: The Global Watch The IMC Plan in Brazil, Japan, and Switzerland 1 Statement of Purpose Swatch (‗Swiss‘ + ‗watch‘) watches, created under the management of Nicolas Hayek, are fashion statements and pop-culture icons. They feature witty, outlandish designs that use intense colors and are youthful, provocative, stylish, and unpredictable. The mission of the IMC campaign is to tie the brand image with creative art in order to tell the brand story, strengthen Swatch‘s brand identity among the target audience (young students or professionals, aged 18-25) globally, and consistently incorporate different and relevant mediums (print ad, website, MTV – user-generated content, and online communities) to reach the target audience. The multi-country marketing analysis of The Swatch Group will aid in developing the IMC strategy and campaign for Swatch‘s CreArt (‗creativity‘ + ‗art‘) Collection in the following three countries: Brazil, Japan and Switzerland. When reading this, please be aware that Swatch did not impose an integrated marketing campaign in Brazil; rather, they only held one event and communicated to customers through Twitter. Therefore, the Brazil section is composed mostly of what The Swatch Group should do in order to meet their objectives. Furthermore, the cultural dimensions and components that will affect...

Words: 39383 - Pages: 158

Free Essay

#### Spa & Wellness Industry

...http://www.nckvietnam.com Understanding the Global Spa Industry http://www.nckvietnam.com This page intentionally left blank http://www.nckvietnam.com Understanding the Global Spa Industry: Spa Management Marc Cohen and Gerard Bodeker AMSTERDAM • BOSTON • HEIDELBERG • LONDON • NEWYORK • OXFORD • PARIS • SAN DIEGO • SAN FRANCISCO • SINGAPORE • SYDNEY • TOKYO Butterworth-Heinemann is an imprint of Elsevier http://www.nckvietnam.com Butterworth-Heinemann is an imprint of Elsevier Linacre House, Jordan Hill, Oxford OX2 8DP, UK 30 Corporate Drive, Suite 400, Burlington, MA01803, USA First edition 2008 Copyright © 2008 Elsevier Ltd. All rights reserved No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means electronic, mechanical, photocopying, recording or otherwise without the prior written permission of the publisher Permissions may be sought directly from Elsevier’s Science & Technology Rights Department in Oxford, UK: phone ( 44) (0) 1865 843830; fax ( 44) (0) 1865 853333; email: permissions@elsevier.com. Alternatively you can submit your request online by visiting the Elsevier web site at http:/ /elsevier.com/locate/permissions, and selecting Obtaining permission to use Elsevier material Notice No responsibility is assumed by the publisher for any injury and/or damage to persons or property as a matter of products liability, negligence or otherwise, or from any use or operation of any...

Words: 153860 - Pages: 616