Free Essay

Cmis 102 Homework 1

In:

Submitted By cjcuster89
Words 653
Pages 3
Program Description:
This program will calculate all of the useable area (in square feet) in a house. This specific house contains four rooms, all of which are rectangular in shape.

Analysis:
My goal in creating this program is that it successfully calculates the useable square footage in a house that contains four rooms. The values which are required to perform the calculations will be the length of room 1 times the width of room 1(in feet). This will give the area of room one, which will in turn become the useable area for this particular room. The same length times width (L x W) formula will then be used for all subsequent rooms. After the area for all four rooms has been found, the sum of the area of each room will be the final output for useable square feet. The output values are as follows: * L1: The length for room 1 * W1: The width for room 1 * L2: The length for room 2 * W2: The width for room 2 * L3: The length for room 3 * W3: The width for room 3 * L4: The length for room 4 * W4: The width for room 4 * T1: Total square feet for room 1 * T2: Total square feet for room 2 * T3: Total square feet for room 3 * T4: Total square feet for room 4 * Total_SqFt: Total useable square footage in the house

Test Plan:

Test Case # | Input | Expected Output | 1 | Room 1 - Length:20 Width:14Room 2: - Length:16 Width:12Room 3: - Length:22 Width:16Room 4: - Length:12 Width:10 | Square Feet: 944 | 2 | Room 1 - Length:17 Width:11Room 2: - Length:11 Width:9Room 3: - Length:13 Width:16Room 4: - Length:19 Width:12 | Square Feet: 722 | 3 | Room 1 - Length:10 Width:8Room 2: - Length:12 Width:10Room 3: - Length:14 Width:12Room 4: - Length:16 Width:14 | Square Feet: 592 |

Psuedocode:
//This program will calculate the useable area of a house with four rectangular rooms in square feet
//The sum of all areas of each room will be the final output value for useable square footage
//Declare variables
Declare L1, W1, L2, W2, L3, W3, L4, W4, T1, T2, T3, T4, Total_SqFt as integers
//Set values of integers set L1=20 set W1=14 set L2=16 set W2=12 set L3=22 set W3=16 set L4=12 set W4=10 set T1=L1*W1 set T2=L2*W2 set T3=L3*W3 set T4=L4*W4 set Total_SqFt=T1+T2+T3+T4
//Print all variables on screen print Declare L1, W1, L2, W2, L3, W3, L4, W4, T1, T2, T3, T4, Total_SqFt
End Program

C Code:

//The purpose of this program will calculate the useable area, in square feet, of a house with four rectangular rooms
//The sum of the area of each room will be the total useable area (in square feet)

#include

int main(void) { /* Declare Integers*/ int L1; int W1; int L2; int W2; int L3; int W3; int L4; int W4; int T1; int T2; int T3; int T4; int Total_SqFt; /*Set Integers*/ L1=20; W1=14; L2=16; W2=12; L3=22; W3=16; L4=12; W4=10; T1= L1*W1; T2= L2*W2; T3= L3*W3; T4= L4*W4; Total_SqFt= T1+T2+T3+T4; printf("The area of room one (T1) is %d multiplied by %d, which equals %d. \n", L1,W1,T1); printf("The area of room two (T2) is %d multiplied by %d, which equals %d. \n", L2,W2,T2); printf("The area of room three (T3) is %d multiplied by %d, which equals %d. \n", L3,W3,T3); printf("The area of room four (T4) is %d multiplied by %d, which equals %d. \n", L4,W4,T4); printf("All of these combined makes the total useable space %d square feet. \n", Total_SqFt); /*This is the end of my program. All code is in order and working.*/ return 0;
}

Similar Documents

Free Essay

Cmis 102 Homework 1

...Peter Doyle CMIS 102 Prof. Tanney HW1 Purpose of the program This program will be used to determine 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...

Words: 354 - Pages: 2

Premium Essay

Adas

...CMIS102 Homework Assignment 1 (Worth 13% of your grade) Student Name: Class/Section: CMIS 102 Professor Name: Assignment due date: 03 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. ...

Words: 257 - Pages: 2

Premium Essay

Cmis 102, Hw Week 3

...Week 3 Homework for CMIS 102. * Program description: This program will calculate the total price of a laptop computer system. The program will ask the user to enter the desired CPU speed, RAM amount, Hard Drive and Monitor Size. The program use these values to calculate and then print the price of a computer system. The design step will include both pseudocode and flow chart visualization. * Analysis: I will use sequential and selection programming statements. I will define 1 float number for CPU and 4 integers for the RAM(random access memory), Hard Drive, Display and Price : CPU, RAM, HD, Monitor, Price. I will be using selection statements (If- then) to find out CPU, RAM, HD and Monitor variable option and price. For example if we have: Two HD Options: 250GB ($50) and 500GB($ 100) Two RAM Options: 4GB($ 100) and 8GB( $150) Two Display Options: 13 Inch Retna($150) and 15 inch ($250) Two CPU options: 2.7GHz ($900) and 2.9GHz ($1000) The selection statement will be of this form: //Input CPU if (CPU == 2.7) then * set price = 900 * if (CPU == 2.9) then set price = 1000 We will repeat this process for every each of our variables, since we have only a few options it should not take much time. Otherwise we will have to group some of our options. The next step will be to find out the total Price of our selected laptop computer system by simple adding all variable and Print our computer Price. Price = CPU+ RAM+HD+ Display; printf...

Words: 712 - Pages: 3

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

Words: 472 - 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

Cmis 102 Hw2

...CMIS102 Homework Assignment 2 Student Name: Class/Section: CMIS 102/ 3110 Professor Name: Assignment due date: 03 February 2014 Problem definition: Calculate the total price to purchase all the components required to build a state-of-the-art gaming computer from components available on the internet. A. Problem Analysis – Following the directions in the assignment, clearly write up your problem analysis in this section. We are writing a program to calculate the total cost of a gaming computer system. The total cost the computer system should be calculated using the following formula (TotalCost= CpuChoiceCost + RAMChoiceCost + HardDriveCost + ComponentsCost). The cost will be represented by integers. The results should be placed in variable TotalCost. The inputs, for the program are: ComponentsCost, TotalCost, A to Q, Yes or No The output for the program is TotalCost As Float. 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 MotherboardCost, CpuChoiceCost, SounCardCost, GraphicsCardCost, CaseCost, MonitorCost, PowerSupplyCost, DVDDriveCost, HardDriveCost, RAMChoiceCost, OperatingSystemCost AS Character Declare A to R As Integer Display a Welcome message Write “Welcome to Computer World” // Prompt for and input start building your system: Write “Would you like to start building your System?” Input Yes OR No Display...

Words: 955 - Pages: 4

Premium Essay

Career Planning

...Leadership Development Seminars and ECQ-based Readings The success or failure of any endeavor depends on leadership. Now, more than ever before, we need leaders in our organizations and in our world. Great leaders create and communicate a vision and move people into action to achieve it. They ignite our passion and inspire us to do our best. Government leaders in the 21st century are experiencing change at a more rapid pace than previous generations. Rapid advances in technology have expanded the quantity of work we are capable of accomplishing, and also where it’s accomplished. We have a more highly educated workforce, yet face diminishing resources with an increased demand for productivity, and the essential services we provide to the American public. To be successful at navigating these challenges leaders must develop the essential skills to motivate their employees, effectively communicate with others, fine-tune critical thinking skills, and build and leverage partnerships. Future leaders must also be visionary; i.e., possess the ability to identify trends and the courage to be innovative. Being technically adept in your field will no longer be enough. In response to these demands on senior executives, the U.S. Office of Personnel Management identified five Executive Core Qualifications (ECQs) that all aspiring government leaders and executives must possess. These ECQs and Fundamental Competencies were developed by OPM after extensive research on the attributes...

Words: 181771 - Pages: 728

Premium Essay

Leadership Development - Doe

...Leadership Development Seminars and ECQ-based Readings The success or failure of any endeavor depends on leadership. Now, more than ever before, we need leaders in our organizations and in our world. Great leaders create and communicate a vision and move people into action to achieve it. They ignite our passion and inspire us to do our best. Government leaders in the 21st century are experiencing change at a more rapid pace than previous generations. Rapid advances in technology have expanded the quantity of work we are capable of accomplishing, and also where it’s accomplished. We have a more highly educated workforce, yet face diminishing resources with an increased demand for productivity, and the essential services we provide to the American public. To be successful at navigating these challenges leaders must develop the essential skills to motivate their employees, effectively communicate with others, fine-tune critical thinking skills, and build and leverage partnerships. Future leaders must also be visionary; i.e., possess the ability to identify trends and the courage to be innovative. Being technically adept in your field will no longer be enough. In response to these demands on senior executives, the U.S. Office of Personnel Management identified five Executive Core Qualifications (ECQs) that all aspiring government leaders and executives must possess. These ECQs and Fundamental Competencies were developed by OPM after extensive research on the attributes...

Words: 181771 - Pages: 728

Premium Essay

Pr Cases

...Public Relations Cases This collection of contemporary international public relations case studies is an invaluable resource for teachers, researchers and students working in public relations, corporate communications and public affairs, as well as offering practitioners an indepth understanding of the effective use of public relations in a range of organizational contexts. Including cases from the UK, Norway, Sweden, Spain, South Africa, Canada and the USA, with a focus on such global corporations as Shell, BBC America, Worldcom, PriceWaterhouseCoopers and Marks & Spencer, it offers important insights into the development of public relations and communications strategies. These include: • • • • • • • • Corporate identity change and management Global reputation management Crisis management in the oil, shipping and tourism industries Developing strategic alliances between voluntary and private sector organizations Public relations support for international branding and market entry The importance of internal communications during international mergers The integration of public relations and marketing communications Business-to-business communication The cases examined in this book demonstrate the breadth of contemporary public relations practice and the increasing importance of the public relations function in both public and private sector organizations worldwide. Danny Moss is Co-Director of the Centre for Corporate and Public Affairs at the Manchester Metropolitan University...

Words: 107599 - Pages: 431

Premium Essay

Daimler-Chrysler Merger Portrayal

...permission of the publisher. Permissions may be sought directly from Elsevier’s Science & Technology Rights Department in Oxford, UK: phone: (+44) 1865 843830, fax: (+44) 1865 853333, e-mail: permissions@elsevier.com.uk. You may also complete your request on-line via the Elsevier homepage (http://elsevier.com), by selecting “Customer Support” and then “Obtaining Permissions.” Recognizing the importance of preserving what has been written, Elsevier prints its books on acid-free paper whenever possible. Library of Congress Cataloging-in-Publication Data Rao, Madanmohan. KM tools and techniques : practitioners and experts evaluate KM solutions / Madanmohan Rao. p. cm. Includes bibliographical references and index. ISBN 0-7506-7818-6 (alk. paper) 1. Knowledge management. 2. Organizational learning. 3. Knowledge management—Data processing. 4. Management information systems. 5. Information resources management. 6. Database management. I. Title Knowledge management tools and techniques. II. Title. HD30.2.R356 2004 658.4¢038—dc22 2004050698 British Library...

Words: 182966 - Pages: 732