Cmis 102 Assignment 2

In: Computers and Technology

Submitted By pbaker3131
Words 843
Pages 4
Program Description:

The program I’m creating is going to be utilized to determine the usable surface area of each room in a four-room house and then calculate the usable square footage of the house as a whole.

Analysis:

To start this program, I needed to come up with a plan or blueprint. I utilized the Modular Approach to break this down into smaller parts. The main module is the solution to the problem; determine the square footage of a four-bedroom house with the all rooms being rectangles. The program will perform the equation for the area of a rectangle (Area = Length * Width) for each room. Each sub-module will perform the equation and come up with a solution. Once the solutions are identified for each room, we must finish the task by finding the sum of the four rooms’ square footage to calculate the houses’ total square footage (Area RM1 + Area RM2 + Area RM3 + Area RM4 = Total Square Footage of House).

Calculate the Total Square Footage of a four-bedroom house.
Calculate the Total Square Footage of a four-bedroom house.

Area of Room One
Area of Room One

PLUS
PLUS

Area of Room Two
Area of Room Two

PLUS
PLUS

Area of Room Three
Area of Room Three

PLUS
PLUS

Area of Room Four
Area of Room Four

Analysis (CONT):

In this program, I will be using various variables with different definitions. The table below will list and identify the variables:

VARIABLES | DEFINITION | LR1 | LENGTH OF ROOM ONE | WR1 | WIDTH OF ROOM ONE | LR2 | LENGTH OF ROOM TWO | WR2 | WIDTH OF ROOM TWO | LR3 | LENGTH OF ROOM THREE | WR3 | WIDTH OF ROOM THREE | LR4 | LENGTH OF ROOM FOUR | WR4 | WIDTH OF ROOM FOUR | AR1 | AREA OF ROOM ONE | AR2 | AREA OF ROOM TWO | AR3 | AREA OF ROOM THREE | AR4 | AREA OF ROOM FOUR | T | TOTAL SQUARE FOOTAGE OF HOUSE |

To come up with the square footage of each rectangular…...

Similar Documents

Cmis 102

...time and energy trying to do many things, but do we spend time on what’s really important? Indicate how much time you spend on, or how important the following are to you. (Be honest) ACTIVITY Going online to chat with friends or check emails Spending time to get a guy or girl notice you Working to get a car, or for money to buy gas and insurance Playing sports, practicing, or traveling around to compete Attending church youth functions, camps or outreach events Doing homework or studying for that exam Sitting in front of the television or surfing the Internet Listening to music or going to concerts Spending quality time alone with God LOW HIGH 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 Discussion Questions: ● ● ● ● If you feel comfortable doing so, share your answers with others in your group. Does spending time alone with God take a priority over everything else? Are there any activities in your life that you are spending too much time on? Isn't it okay to spend lots of time on things you really enjoy, as long as it isn't something bad? ...

Words: 278 - Pages: 2

Cmis 102

...Course: CMIS 102  Date: 1/23/2014 Problem: 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. We are trying to calculate the square feet of a 4 bedroom house To do this, I will need to know each room’s length and breadth, then calculate each room’s area before I will then find the total. Map: When * = times Sum = total Room# =Room number Length# = length or a particular room Breadth# = breadth or a particular room Formula: Area of Room1=length1*breadth1 Area of Room2=length2*breadth2 Area of Room3=length3*breadth3 Area of Room4=length4*breadth4 The total Number of Square Foot’s = Area of room1+ Area of room2+ Area of room3+ Area of room4 Program Design Pseudo code: Start Declare the variables v ,A as integer length[4], breadth[4],area[4] as double array sum as double Display “Enter the Rooms length and Breadth” For v = 1 to 4 do Accept length[v], breadth[v] Next v Display “Finding Area and total number of square foots” Set sum =0 For A= 1 to 4 Area [A] = length [A]* breadth [A] Sum = sum + Area [A] Next A 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 v,A; double length[4], breadth[4] ,area[4], sum; } cout<<"\nEnter the length and breadth of each room"; for (v=0;v<4;v++) { cout<<"\nRoom......

Words: 420 - Pages: 2

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

Words: 955 - Pages: 4

Cmis 102

...1. Problem definition: Design a program that will allow a user to Input a list of your family members along with their age and state where they reside. Determine and print the average age of your family and print the names of anyone who live in Texas. 2. Problem Analysis: The program will inform user to input family member name, age and state. The program will take the years of all members entered and add them together and then take the total of members entered (10) and divide the total coming up with the average age. The program will also calculate and identify each state of each person entered and using the defined input identifies those people from Texas and prints their names out only. The output of the program is three fold. The total average age of all family entries, identify who is from TX and print their name out. The program is to calculate the total average of the family age wise and determine their location with only printing out those members that are from Texas (TX). The program will take inputs from the user who will input the name, age and location of each family member. The program will take the years of all members entered and add them together and then take the total of members entered (10) and divide the total coming up with the average age. The program will also calculate and identify each state of each person entered and using the defined input identifies those people from Texas and prints their names out only. The output of the program is three......

Words: 517 - Pages: 3

Cmis 102

...What is the necessary input and how you will obtain the required output from the given input? Also, include your variable names and definitions. Be sure to describe the necessary formulas and sample calculations that might be needed. 2. Using a similar approach as example 3.6 (textbook page 146): “A new Car Price Calculator”, provide your program design for the program you analyzed for calculating the total price of your gaming computer. Be sure to describe the fundamental tasks (i.e., things your program must do) needed to solve the problem so you can use a modular design. Provide pseudocode of your overall design that includes the Main module and the order of the module calls (see page 148 for an example) and a Hierarchy chart for the computer price calculator (see figure 3.8 page 148). Finally, list all of your pseudocode for each module. (See pages148-150 as an example.) Include header and step comments in your pseudocode, using a similar approach as the example provided in section 2.3 (textbook page 86). See example 2.8 on pages 87-88). 3. Prepare at least 5 sets of input data (Test data) along with their expected output for testing your program. Your test data can be presented in the form of a table as was shown in Assignment 1. Be sure that you provide expected output for each test case....

Words: 597 - Pages: 3

Cmis 102 Homework 2

...Homework Assignment #2 Analysis Input: The input of this program will consist of the base price (BasePrice), the operating system choice (OSChoice), the monitor choice (MonitorChoice), and the case choice (CaseChoice). After the user has made all of the required choices, the program will determine the appropriate cost of that option: OSCost, MonitorCost, and CaseCost. Output: The required output for the program will be the total cost (TotalCost) of the state of the art gaming computer. The program will then determine the total cost of the state of the art gaming computer by using the following computation: TotalCost = BasePrice+OSCost+MonitorCost+CaseCost. Variables: BasePrice // The cost of the computer prior to the user deciding on the three options OSChoice // The operating system selected by the user Win7 // Windows 7 Home Premium Win8 // Windows 8.1 RedHat // Red Hat Linux 9.0 Personal MonitorChoice // The monitor selected by the user Asus // Asus 23.6” LED ViewSonic // ViewSonic 20” LED Acer // Acer 23” LCD CaseChoice // The case selected by the user Thermal // Thermaltake Gaming Case Rosewill // Rosewill Black Gaming Case NZXT // NZXT Guardian Gaming Case OSCost // The cost of the selected operating system MonitorCost // The cost of the selected monitor CaseCost // The cost of the selected case TotalCost // The total cost of the gaming system Design Input the base price of the computer Calculate user selected options to add the......

Words: 735 - Pages: 3

Acc 102 - Assignment 2

...they are reported under the accrual basis in the income statement. The difference between the two is $84,000 - $79,000 = $5,000. That’s the interest expense incurred during the year that had not been paid as of year-end. This amount should be included among the accrued expenses appearing as the current liability in the company’s balance sheet. b. Compute the following (round to one decimal place): 1. Current ratio Current assets: Cash………………………………………………………………….. $ 30,000 Accounts receivable………………………………………………… 150,000 Inventory……………………………………………………………... 200,000 Total current assets………………………………………………….. $380,000 Current liabilities……………………………………………………… $150,000 Current ratio ($380,000 + $150,000)…………………………….. 2.5 to 1 2. Quick ratio Quick assets: Cash…………………………………………………………………. $ 30,000 Accounts receivable……………………………………………….. 150,000 Total quick assets……………………………………………………. $180,000 Current liabilities……………………………………………………… $150,000 Quick ratio ($180,000 + $150,000)……………………………….. 1.2 to 1 3. Working capital Current assets [part b (1)]………………………………………….. $380,000 Less: Current liabilities……………………………………………… 150,000 Working capital……………………………………………………… $230,000 4. Debt ratio Total liabilities Total assets…………………………………………………………. $1,000,000 Less: Total stockholders’ equity…………………………………... 300,000 Total liabilities………………………………………………………… $ 700,000 Total assets…………………………………………………………... $1,000,000 Debt ratio ($700,000 +......

Words: 1192 - Pages: 5

Cmis 102

...Analysis: User will be asked to provide length and width of the rectangle through keyboard. The program will consist of three modules. These include * Main module: This module will be the main starting module. It is responsible to get user input and call other modules to calculate and display rectangle area and perimeter. * calcArea module: This module will take rectangle length and width as input and return rectangle area as output. Area will be calculated as: Area = length x width * calcPerimeter module: This module will take rectangle length and width as input and return rectangle perimeter as output. The parameter will be calculated as: Perimeter = 2 x width + 2 x length * displayResults module: This module will take Area and Perimeter of the triangle as input arguments and display results to the user. 2. Provide your program design for the problem you analyzed for calculating and displaying the area and perimeter of a rectangle. Always work for modular design where possible. Be sure to use separate functions for calculating the area and perimeter of the rectangle. Other subprograms for Input and Output should be included as needed. Be sure to describe the fundamental tasks (i.e., things your program must do) needed to solve the problem so you can use a modular design. Provide pseudocode of your overall design that includes the Main module and the order of the module calls, and a Hierarchy chart for the program. Finally, display the flow charts......

Words: 489 - Pages: 2

Cmis 102 Assignment 1

...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 + room 4 //display output...

Words: 304 - Pages: 2

Cmis 102

...each room. The formula to achieve this is: Length x Width (LxW). The area of each is room then summed up to determine to actual square footage of the house, which is the actual usable living space. The variable name is “a” for area which was used to test and run the program. Please see calculations and table: Area of Room 1= Length1 x Width1 (14*12)=168 Area of Room 2= Length2 x Width2 (9*12)= 108 Area of Room 3= Length3 x Width3 (8*11)= 88 Area of Room 4= Length4 x Width4 (13*13) =169 Area of Room 1 + Room 2 + Room 3 =Room 4 = Total Square footage (533) Useable square footage of a house Total number of Rooms = 4 Area=L x W of each room Variables= Area Perform Calculations: Length x Width Room 1 = 168 Length x Width Room 2 = 108 Length x Width Room 3 = 88 Length x Width Room 4 =169 Output Results: 168+108+88+169= 533 Pseudocode Test 1: #include int main () { /* variable definition: */ int a ; /* variable initialization */ a = 14*12+9*12+8*11+13*13 ;printf("Integers (a) are : %d\n", a); return 0; } Success time: 0 memory: 2008 signal:0 Integers (a) are : 533 Test 2: #include int main () { /* variable definition: */ int a ; /* variable initialization */ a = 10*14+7*14+12*14+13*14 ;printf("Integers (a) are : %d\n", a); return 0; } Success time: 0 memory: 2008 signal:0 Integers (a) are : 588 Test 3: #include int main () { /* variable definition: */ int a ; /* variable initialization */ ......

Words: 367 - Pages: 2

Cmis 102 Assignment 1

...Jeremy Lovell CMIS 102 7987 Introduction to Problem Solving and Algorithm Design (2152) Bryan Nilsen 29 March 2015 NLT: 11:59 PM Program Description: This program will calculate the total usable square feet of a house by multiplying the length of width of each room and add up the product of each room to give the total square feet. Analysis: I know to calculate square feet of a room you have to multiply the length and width. Since the house has multiple rooms to get the total square feet you have to add the square feet of each room to get the total. I decide to create the input simple by giving the variables names that are easily identifiable. L stands for Length and W stands for Width, RM stands for room which is the product of the corresponding Length and Width. Finally SgFT is the sum of all three RMs. I used these variable names to easily see within the program where I get there data values. Test Data: | Input: | Output | Test Case 1: | Room1: length=10, width=20 Room2: length=15, width=10 Room3: length=20, width=15 | Total Square Feet: 650 | Test Case 2: | Room1: length=13, width=11 Room2: length=9, width=7 Room3: length=22, width=19 | Total Square Feet: 624 | Test Case 3: | Room1: length=8, width=6 Room2: length=4, width=12 Room3: length=30, width=25 | Total Square Feet: 846 | Pseudocode: //Declare Variables Declare L1, L2, L3, W1, W2, W3, RM1, RM2, RM3 and SqFT //Set Values of Variables Set L1=10 Set L2=15 Set L3=20 Set......

Words: 294 - Pages: 2

Cmis 102

...1. Problem definition: Design a program that will allow a user to Input a list of your family members along with their age and state where they reside. Determine and print the average age of your family and print the names of anyone who live in Texas. Note: Your problem analysis should have already been submitted as part 1 of the assignment. A. Program Design – Following the directions in the assignment, clearly write up your problem design in this section and comment your pseudocode. Complete Pseudocode With Comments: // Family Member Data // Programmer: J. West, University of Iowa // Version 1.0 – October 9, 2014 /* This program allows the user to input family data and print the average age of their family and the names of any relatives that live in the state Texas. */ // Variables used: // FamMbrName = Family member’s name (As String) // Age[ ] = Array name (As Integer) // State = State family member resides (As String) // OutOfState = Family Members that live in the state of Texas (As String) // AverageAge = Sum of age of family members divided by 10 (As Float) // Names[ ] = Array name (As String) // Count = Counter (As String) // YearsOld = Age of family members (As Integer) // Y = Identifies family member (As Integer) // Z = Identifies age (As Integer) // AgeSum = Sum of the ages of the family members (As Float) // NewAvgAge = Sum of age of family members divided by 10 (As Float) Main module Declare Names[10], FamMbrName, State, OutOfState As...

Words: 781 - Pages: 4

Cmis 102

...Pseudocode for the program // Declaring variables Declare Integer InternetHits[10] Declare Integer i // Loop for inputting values For i = 0 to 9 Print 'Enter the value-'    Print i+1 Input InternetHits[i] End For // End of Program. 1. #include <stdio.h> 2. int main () { 3. int internetHits[10]; 4. int hits; 5. int counter; 6. for(counter=0;counter<10;counter++){ 7. printf("Enter number of hits: "); 8. scanf("%d",&internetHits[counter]); 9. } 10. //Display Values 11. printf("Entered values are: \n"); 12. for (counter = 0;counter<10;counter++){ 13. printf("%d\n",internetHits[counter]); 14. } 15. return 0; 16. } ************************************************************************* Question Design and write a program, using functions, that calculates the area and perimeter of a rectangle whose dimensions (length and width) are provided by a user. There are 4 components of your submission including: Program Description- A detailed, clear description of the program you are building. Analysis- Demonstrates your thought process and steps used to analyze the problem. Be sure to include the......

Words: 790 - Pages: 4

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

Words: 354 - Pages: 2

Cmis 102

...1.What information do you consider important to be conveying to the general public regarding the impact of the acute usage of alcohol on the body? usage of alcohol can have many negative effects on the body. Over time and with long term use an individual can develop both physical and emotional symptoms. Physical symptoms can include liver failure, changes in brain function. 2. Discuss the arguments for and against classifying alcohol dependence as a disease. Are there differences with drug addiction? How about compulsive gambling? Alcoholism is a primary chronic disease with genetic psychosocial and environmental factors influencing its development and manifestations. The disease is often progressive and fatal. People use the terms drug abuse and addiction. One can abuse drugs without necessarily being addicted to drugs. Drugs abuse specifically requires that drugs have a negative effect on the user’s life. Drug addiction the addict has developed a tolerance to drugs increasing the used amount and experiences withdrawal. Compulsive gambling disorder is uncontrollable urge to keep gambling despite the tool it takes on your life. 3. One treatment method utilized for withdrawal is pharmacologic treatment. Discuss your perspectives of using pharmacologic treatment, what are the pros and cons?   treatment for alcohol withdrawal is only works if the patient is correctly taking the medication. If a patient would rather drink thank take the prescribed medication than......

Words: 253 - Pages: 2

Элвин и бурундуки: Грандиозное бурундуключение / Alvin and the Chipmunks: The Road Chip (2015) HDRip | iTunes | 축제 & 파티 용품 | Chris Martin and Ariana Grande - Don't Look Back In Anger (One Love Manchester)