Free Essay

Cmis Hw 1

In:

Submitted By mlubisich
Words 293
Pages 2
Matt Lubisich
CMIS 102 6983 Introduction to Problem Solving and Algorithm Design (2148)
Due Date: 21 September 2014

I will be designing a program that will calculate the amount of usable square feet in a 4 bedroom house.

The program will take the individual dimensions of each living space and calculate the overall amount of usable square feet. The Input will be each room and will be labeled as Room 1 through 4. Then we will multiply the length times the width of each room. Next we will add the totals of the 4 rooms to get the expected output which is the usable square feet.

Test Case # | Input | Expected Output | Test 1 | Room 1: length=15, width=15;Room 2: length=11, width=13;Room 3: length=12, width=12;Room 4: length=10, width=11; | 622 square feet | Test 2 | Room 1: length=16, width=15;Room 2: length=12, width=14;Room 3: length=14, width=10;Room 4: length=13, width=11; | 691 square feet | Test 3 | Room 1: length=14, width=16;Room 2: length=13, width=13;Room 3: length=11, width=12;Room 4: length=10, width=12; | 645 square feet |

Pseudocode
//This program takes the square footage of 4 rooms to determine the usable square footage of a living space.
//Declare variables
Declare Room 1, Room 2, Room 3, Room 4, sum As Integer
//Initialize variables
Set Room 1 = X * Y or length times width
Set Room 2 = X * Y or length times width
Set Room 3 = X * Y or length times width
Set Room 4 = X * Y or length times width

Set sum = Room 1 + Room 2 + Room 3 + Room 4
//Display output
Write Room 1, Room 2, Room 3, Room 4 print sum

Similar Documents

Free Essay

Cmis 102 Hw 1

...inputs so I decided to go with an if statement format. I decided I would need the number of rooms, length, and width of each room from the user. The formula for square feet (length * width). Variables - number_of_rooms, room1_l, room1_w, room1_sqft, room2_l, room2_w, room2_sqft, room3_l, room3_w, room3_sqft, room4_l, room4_w, room4_sqft, total Testing - test1 2,10,10,12,3 "The square footage of room 1 is 100" "The square footage of room 2 is 36" "The total usable square footage of the house is 136" test2 1,4,5 "The square footage of room 1 is 20" test3 6.2,3,24,00001,222 error Psuedocode main input number_of_rooms if number_of_rooms is 1 input room1_l input room1_w compute room1_sqft as room1_l * room1_w write "The square footage of room 1 is"room1_sqft"\n" else if number_of_rooms is 2 input room1_l input room1_w input room2_l input room2_w compute room1_sqft as room1_l * room1_w compute room2_sqft as room2_l * room2_w compute total as room1_sqft + room2_sqft write "The square footage of room 1 is"room1_sqft"\n" write "The square footage of room 2 is"room2_sqft"\n" write "The total usable square footage of the house is "total"\n" else if number_of_rooms is 3 input room1_l...

Words: 945 - Pages: 4

Free Essay

Concrete

...AS 3600—2009 AS 3600—2009 Australian Standard® Concrete structures Accessed by NEWCREST MINING LIMITED on 14 Jul 2010 This Australian Standard® was prepared by Committee BD-002, Concrete Structures. It was approved on behalf of the Council of Standards Australia on 8 October 2009. This Standard was published on 23 December 2009. The following are represented on Committee BD-002: • • • • • • • • • • • • • • • • AUSTROADS Association of Consulting Engineers Australia Australian Building Codes Board Bureau of Steel Manufacturers of Australia Cement Concrete & Aggregates Australia—Cement Cement Concrete & Aggregates Australia—Concrete Concrete Institute of Australia Engineers Australia La Trobe University Master Builders Australia National Precast Concrete Association Australia Steel Reinforcement Institute of Australia University of Adelaide University of Melbourne University of New South Wales University of Western Sydney This Standard was issued in draft form for comment as DR 05252. Standards Australia wishes to acknowledge the participation of the expert individuals that contributed to the development of this Standard through their representation on the Committee and through the public comment period. Keeping Standards up-to-date Accessed by NEWCREST MINING LIMITED on 14 Jul 2010 Australian Standards® are living documents that reflect progress in science, technology and systems. To maintain their currency, all Standards are periodically reviewed, and...

Words: 70634 - Pages: 283

Free Essay

The It Revolution

...NYSE Listed Eligible Options by Symbol Eligible Options by Symbol as of 25 Oct 2010 Symbol A AA AAI AAN AAP AAPL AATI AAV AAWW AB ABAT ABAX ABB ABC ABFS ABK ABMD ABT ABV ABX ACAD ACAS ACC ACCL ACE ACGL ACGY ACH ACI ACL ACM ACN ACOM ACOR ADBE ADI ADLR ADM ADP ADS ADSK ADTN ADY AEC AEE AEIS AEM AEO AEP AER Name Agilent Technologies Inc. ALCOA, INC AirTran Holdings, Inc. Aaron's, Inc. ADVANCE AUTO PARTS INC Apple Inc. Advanced Analogic Technologies, Inc. Advantage Oil & Gas LTD. Atlas Air Worldwide Holdings, Inc. AllianceBernstein Holding, L.P. Advanced Battery Technologies, Inc. Abaxis Inc ABB Ltd. AmerisourceBergen Corp. Arkansas Best Corp AMBAC Financial Group Abiomed Inc Abbott Laboratories AmBev Compamhia De Bebidas Das Ame Barrick Gold Corp. Acadia Pharmaceuticals Inc. American Capital Ltd American Campus Communities, Inc. Accelrys, Inc. ACE Limited Arch Capital Group Ltd Acergy S.A. Alum Corp of China Limited Arch Coal, Inc. ALCON Aecom Technology Corporation Accenture PLC Ancestry.com, Inc. Acorda Therapeutics, Inc. Adobe Systems Inc Analog Devices, Inc. Adolor Corp Archer-Daniels-Midland Co Automatic Data Processing Alliance Data Systems Autodesk Inc Adtran Inc AMERICAN DAIRY INC Associated Estates Realty Ameren Corporation Advanced Energy Industries Inc Agnico-Eagle Mines Ltd. American Eagle Outfitters American Electric Power Aercap Holdings N.V. NYSE Arca Lead Market Maker UBS SECURITIES, LLC MORGAN STANLEY & CO CITADEL SECURITIES LLC CITADEL SECURITIES LLC...

Words: 18155 - Pages: 73

Premium Essay

Work, Culture and Identity in Mozambique and Southafrica 1860-1910

...Acknowledgments ix Acknowledgments This book owes a great deal to the mental energy of several generations of scholars. As an undergraduate at the University of Cape Town, Francis Wilson made me aware of the importance of migrant labour and Robin Hallett inspired me, and a generation of students, to study the African past. At the School of Oriental and African Studies in London I was fortunate enough to have David Birmingham as a thesis supervisor. I hope that some of his knowledge and understanding of Lusophone Africa has found its way into this book. I owe an equal debt to Shula Marks who, over the years, has provided me with criticism and inspiration. In the United States I learnt a great deal from ]eanne Penvenne, Marcia Wright and, especially, Leroy Vail. In Switzerland I benefitted from the friendship and assistance of Laurent Monier of the IUED in Geneva, Francois Iecquier of the University of Lausanne and Mariette Ouwerhand of the dépurtement évangélrlyue (the former Swiss Mission). In South Africa, Patricia Davison of the South African Museum introduced me to material culture and made me aware of the richness of difference; the late Monica Wilson taught me the fundamentals of anthropology and Andrew Spiegel and Robert Thornton struggled to keep me abreast of changes in the discipline; Sue Newton-King and Nigel Penn brought shafts of light from the eighteenthcentury to bear on early industrialism. Charles van Onselen laid a major part of the intellectual foundations on...

Words: 178350 - Pages: 714