Cmis Homework 2

In: Computers and Technology

Submitted By stseitl
Words 380
Pages 2
<Name>
Intro to Problem Solving and Algorithm Design
CMIS 102
Professor
March 30, 2015

My House Room 1 Length: 25’ Width: 17’ | Room 2 Length: 23’ Width: 11’ | | Room 4 Length: 23’ Width: 15’ | Room 3 Length: 25’ Width: 12’ | |

Program Description * To identify the total square footage of the entire house by using mathematical equation and creating a C++ program to run the equation showing the formula and total area.
Analysis
* First thing is to identify the dimensions of each room and add those dimensions to get the total square footage of the house. * Variables: * L = Length * W = Width * R1 = Room 1 * R2 = Room 2 * R3 = Room 3 * R4 = Room4 * Formula: * Dimension – L x W = Room Area (sq. ft.) * Total Square Footage – R1+R2+R3+R4 = House Area (sq. ft.)
Test Plan Test Case # | Input | Expected Output | Room 1 | Length: 25’ x Width: 17’ | 425 square feet | Room 2 | Length: 23’ x Width: 11’ | 253 square feet | Room 3 | Length: 25’ x Width: 12’ | 300 square feet | Room 4 | Length: 23’ x Width: 15’ | 345 square feet | Entire House | Total Square Footage = 1323 square feet |
Pseudocode
#include <stdio.h> int main ()
{
/* variable definition: */ int a, b, c, d, e, f, g, h, i, j, k, l; float m,n,o,p,q; /* variable initialization */ a = 25; b = 17; c = a * b; d = 23; e = 11; f = d * e; g = 25; h = 12; i = g * h; j = 23; k = 15; l = j * k; printf("Integers (a,b,d,e,g,h,j,k) and product (c,f,i,l) are : %d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d \n", a,b,c,d,e,f,g,h,i,j,k,l); m = 425; n = 253; o = 300; p = 345; q = m+n+o+p; printf("Floats (m,n,o,p) and sum (q) are : %.2f,%.2f,%.2f,%.2f,%.2f \n", m,n,o,p,q); return…...

Similar Documents

Homework 2

...FIN515 Homework2 Steven Kelley 3-1: Days Sales Outstanding Greene Sisters has a DSO of 20 days. The Company’s average daily sales are $20,000. What is the level of its accounts receivable? Assume there are 365 days in a year. DSO = receivables / average daily sales Receivables = DSO x average daily sales Receivables = 20 x 20,000 Receivables = $400,000 3-2: Debt Ratio Vigo Vacations has an equity multiplier of 2.5. The Company’s assets are financed with some combination of long term debt and common equity. What is the company’s debt ratio? Debt Ratio = 1 – (1/ EM) Debt Ratio = 1 – (1/2.5) Debt Ratio = 1 – 0.40 Debt Ratio = 0.60 or 60% 3-3: Market / Book Ratio Winston Washers stock price is $75 per share. Winston has $10 billion in total assets. Its balance sheet shows $1 billion in current liabilities, $3 billion in long-term debt and $6 billion in common equity. It has 800 million shares of common stock outstanding. What is Winston’s market/book ratio? M/B = Market price per share / Book value per share Market price per share = $75 per share Book value per share = Common Equity / Outstanding Shares BV / Share = $6 billion / 800 million shares BV / Share = $6 billion / 0.8 billion shares BV / Share = 7.5 M/B = $75 / 7.5 M/B = 10 3-4: Price / Earnings Ratio A company has an EPS of $1.50, a cash flow per share of $3.00 and a price /cash flow ratio of 8.0. What is its P/E ratio? P/E = Price per Share / Earnings per......

Words: 1204 - Pages: 5

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

Cmis Homework 1 Solutions

...get the total area. Mathematical Formulas: Area of a rectangle: Area = Length * Width. Total area of a complex figure: add the areas of the parts. Variables table: Name Data Type Usage Length1 Float Length of room 1 in feet Width1 Float Width of room 1 in feet. Length2 Float Length of room 2 in feet Width2 Float Width of room 2 in feet. Length3 Float Length of room 3 in feet Width3 Float Width of room 3 in feet. Length4 Float Length of room 4 in feet Width4 Float Width of room 4 in feet. Area1 Float Area of room 1 in square feet Area2 Float Area of room 2 in square feet Area3 Float Area of room 3 in square feet Area4 Float Area of room 4 in square feet TotalArea Float Total area in square feet Test Cases: [I omit this as nearly everyone presented good cases] Pseudocode: BEGIN PROGRAM Declare Length1, Width1, Length2, Width2, Length3, Width3, Length 4, Width4 as Float Declare Area1, Area2, Area3, Area4, Area5, TotalArea as Float // Gather the input data Print “Enter the length of room 1 in feet: “ Input Length1 Print “Enter the width of room 1 in feet: “ Input Width1 Print “Enter the length of room 2 in feet: “ Input Length2 Print “Enter the width of room 2 in feet: “ Input Width2 Print “Enter the length of room 3 in feet: “ Input Length3 Print “Enter the width of room 3 in feet: “ Input Width3 Print “Enter the length of room 4 in feet: “ Input Length4 Print “Enter the width of room 4 in feet: “ Input Width4 // Do the area......

Words: 410 - Pages: 2

Cmis 242 Intermediate Programming Project 2

...HELPIDO.COM ------------------------------------------------------------- FOLLOW THE LINK TO GET THE TUTORIAL http://helpido.com/cmis-242-intermediate-programming-project-2/#5 ------------------------------------------------------------- CMIS 242 INTERMEDIATE PROGRAMMING PROJECT 2 ________________________________________ CMIS 242 – Intermediate Programming Programming Project 2 The second programming project involves writing a program to calculate state income tax for a single taxpayer that uses a GUI. The GUI should use the grid layout manager and should looks similar to the following: The salary income, interest income, itemized deductions, exemptions and tax withheld are input to the program. When the Compute Refund button is clicked, the refund should be computed and displayed. Assume all inputs are in whole dollars. The refund should be computed as follows. First compute the total gross income as the sum of the salary and interest income. Then compute the taxable income, which is the gross income less the itemized deductions and exemptions. The exemption amount is computed as the number of exemptions multiplied by $2700. Next compute the tax owed for the year according to the following tax table: Taxable Income Tax Owed From To $0 $50,000 5% of taxable income $50,000 $100,000 $2,500 + 7% of amount above $50,000 $100,000 – $6,000 + 9% of amount above $100,000 Finally, compute the amount of the refund as the amount withheld minus...

Words: 263 - Pages: 2

Cmis 242 Intermediate Programming Project 2

...HELPIDO.COM ------------------------------------------------------------- FOLLOW THE LINK TO GET THE TUTORIAL http://helpido.com/cmis-242-intermediate-programming-project-2/#5 ------------------------------------------------------------- CMIS 242 INTERMEDIATE PROGRAMMING PROJECT 2 ________________________________________ CMIS 242 – Intermediate Programming Programming Project 2 The second programming project involves writing a program to calculate state income tax for a single taxpayer that uses a GUI. The GUI should use the grid layout manager and should looks similar to the following: The salary income, interest income, itemized deductions, exemptions and tax withheld are input to the program. When the Compute Refund button is clicked, the refund should be computed and displayed. Assume all inputs are in whole dollars. The refund should be computed as follows. First compute the total gross income as the sum of the salary and interest income. Then compute the taxable income, which is the gross income less the itemized deductions and exemptions. The exemption amount is computed as the number of exemptions multiplied by $2700. Next compute the tax owed for the year according to the following tax table: Taxable Income Tax Owed From To $0 $50,000 5% of taxable income $50,000 $100,000 $2,500 + 7% of amount above $50,000 $100,000 – $6,000 + 9% of amount above $100,000 Finally, compute the amount of the refund as the amount withheld minus...

Words: 263 - Pages: 2

Cmis 102 Assignment 2

...total square footage of our four-bedroom house (Area RM1 + Area RM2 + Area RM3 + Area RM4 = Total Square Footage). Design: Calculate the Total Square Footage of a 4-Bedroom House written in Psuedocode: Calculate Square Footage of each room: Room One: 1. display “LR1” 2. get length “14” 3. display “WR1” 4. get width “20” 5. calculate area = length x width “14 * 20” 6. display area “AR1” 7. get “280” 8. stop Room Two: 1. display “LR2” 2. get length “12” 3. display “WR2” 4. get width “13” 5. calculate area = length x width “12 * 13” 6. display area “AR2” 7. get “156” 8. stop Room Three: 1. display “LR3” 2. get length “14” 3. display “WR3” 4. get width “16” 5. calculate area = length x width “14 * 16” 6. display area “AR3” 7. get “224” 8. stop Room Four: 1. display “LR4” 2. get length “20” 3. display “WR4” 4. get width “16” 5. calculate area = length x width “20 * 16” 6. display area “AR4” 7. get “320” 8. stop Calculate Total Square Footage of the house by combining the square footage of each room. 1. display “AR1, AR2, AR3, AR4” 2. get “280, 156, 224, 320” 3. calculate Total Square Footage = AR1 + AR2 + AR3 + AR4 “280+156+224+320=T” 4. display total “T” 5. get “980” 6. stop A flow chart has been created to help understand the program creation in a different view: To make sure that we get......

Words: 843 - Pages: 4

Cmis 242 Intermediate Programming Project 2

...HELPIDO.COM ------------------------------------------------------------- FOLLOW THE LINK TO GET THE TUTORIAL http://helpido.com/cmis-242-intermediate-programming-project-2/#5 ------------------------------------------------------------- CMIS 242 INTERMEDIATE PROGRAMMING PROJECT 2 ________________________________________ CMIS 242 – Intermediate Programming Programming Project 2 The second programming project involves writing a program to calculate state income tax for a single taxpayer that uses a GUI. The GUI should use the grid layout manager and should looks similar to the following: The salary income, interest income, itemized deductions, exemptions and tax withheld are input to the program. When the Compute Refund button is clicked, the refund should be computed and displayed. Assume all inputs are in whole dollars. The refund should be computed as follows. First compute the total gross income as the sum of the salary and interest income. Then compute the taxable income, which is the gross income less the itemized deductions and exemptions. The exemption amount is computed as the number of exemptions multiplied by $2700. Next compute the tax owed for the year according to the following tax table: Taxable Income Tax Owed From To $0 $50,000 5% of taxable income $50,000 $100,000 $2,500 + 7% of amount above $50,000 $100,000 – $6,000 + 9% of amount above $100,000 Finally, compute the amount of the refund as the amount withheld minus...

Words: 263 - Pages: 2

Cmis 242 Intermediate Programming Project 2

...HELPIDO.COM ------------------------------------------------------------- FOLLOW THE LINK TO GET THE TUTORIAL http://helpido.com/cmis-242-intermediate-programming-project-2/#5 ------------------------------------------------------------- CMIS 242 INTERMEDIATE PROGRAMMING PROJECT 2 ________________________________________ CMIS 242 – Intermediate Programming Programming Project 2 The second programming project involves writing a program to calculate state income tax for a single taxpayer that uses a GUI. The GUI should use the grid layout manager and should looks similar to the following: The salary income, interest income, itemized deductions, exemptions and tax withheld are input to the program. When the Compute Refund button is clicked, the refund should be computed and displayed. Assume all inputs are in whole dollars. The refund should be computed as follows. First compute the total gross income as the sum of the salary and interest income. Then compute the taxable income, which is the gross income less the itemized deductions and exemptions. The exemption amount is computed as the number of exemptions multiplied by $2700. Next compute the tax owed for the year according to the following tax table: Taxable Income Tax Owed From To $0 $50,000 5% of taxable income $50,000 $100,000 $2,500 + 7% of amount above $50,000 $100,000 – $6,000 + 9% of amount above $100,000 Finally, compute the amount of the refund as the amount withheld......

Words: 263 - Pages: 2

Cmis 242 Intermediate Programming Project 2

...HELPIDO.COM ------------------------------------------------------------- FOLLOW THE LINK TO GET THE TUTORIAL http://helpido.com/cmis-242-intermediate-programming-project-2/#5 ------------------------------------------------------------- CMIS 242 INTERMEDIATE PROGRAMMING PROJECT 2 ________________________________________ CMIS 242 – Intermediate Programming Programming Project 2 The second programming project involves writing a program to calculate state income tax for a single taxpayer that uses a GUI. The GUI should use the grid layout manager and should looks similar to the following: The salary income, interest income, itemized deductions, exemptions and tax withheld are input to the program. When the Compute Refund button is clicked, the refund should be computed and displayed. Assume all inputs are in whole dollars. The refund should be computed as follows. First compute the total gross income as the sum of the salary and interest income. Then compute the taxable income, which is the gross income less the itemized deductions and exemptions. The exemption amount is computed as the number of exemptions multiplied by $2700. Next compute the tax owed for the year according to the following tax table: Taxable Income Tax Owed From To $0 $50,000 5% of taxable income $50,000 $100,000 $2,500 + 7% of amount above $50,000 $100,000 – $6,000 + 9% of amount above $100,000 Finally, compute the amount of the refund as the amount withheld......

Words: 263 - Pages: 2

Homework 2

...Kenneth jones CMIS 102 15 February 2015 Pseudo code /* This is a pseudo code for calculating the GPA for students each registered for different no of courses */ CalculateStdntGpa (int NoStudents, int NoCourses, char StudentNames[],char CourseGrade[]) //INPUT: No of students, Name of students, No of courses and Grades for each course //OUTPUT: The GPA for each student for(int i = 0: i < NoStudents: i++){ StudentNames[i] <- StdntName; for(int j=1: j<= NoCourses: j++){ if(CourseGrade = ”A”){ GradePoint <- 4; } if(CourseGrade = ”B”){ GradePoint <- 3; } if(CourseGrade = ”C”){ GradePoint <- 2; } if(CourseGrade = ”D”){ GradePoint <- 1; } if(CourseGrade = ”F”){ GradePoint <- 0; } GradePoints[j-1] <- GradePoint; } Return GPA } 1. Analysis The following is a brief analysis of the program being built * Inputs The inputs for the program are: I. No of students which should be an integer value to hold the number of students II. Names for students which would be an array structure to hold all student names. This array would be of data type character III. No of courses for each student which is of data type integer IV. Grade for each course registered by each......

Words: 796 - Pages: 4

Cmis Discussion 2

...cost of Gas Input costGas //Input cost of Gas Write(“Enter the cost of Food”) //Prompt user for cost of Food Input costFood //Input cost of Food Write(“Enter the cost of Lodging”) //Prompt user for cost of Lodging Input costLodging //Input cost of Lodging costTotal=costGas+costFood+costLodging //Calculate the total cost of the road trip Input costTotal //Input total cost End //Ends Prompts Submodule DisplayOutput //This submodule will display costTotal Write(“The total of the prospective Road Trip is $” costTotal) End //End DisplayOutput Test Plan Test Case | Input:GasFoodLodging | Expected output:Total Cost | 1 | 505050 | The total cost of the road trip = $ 150 | 2 | 120200300 | The total cost of the road trip = $ 620 | 3 | 152562 | The total cost of the road trip = $ 102 |...

Words: 478 - Pages: 2

Cmis 102 Homework 1

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

Words: 653 - Pages: 3

Homework 2

...as a violation of the Title VII including: race, sex, national origin, sexual orientation, disability, and criminal background. When interviewing the potential hire, you will want to prepare questions that explore the actual job skills and experience you have identified as essential for the position (Heathfield, 2015). Most people will agree that the best strategy is to ask questions that will inspire and motivate the candidate to speak openly without adding stress or pressure to answering the question. 10 Legal Questions 1. Explain what makes you the best candidate to fill this position? * This question is considered appropriate because it falls within the EEOC guidelines. The candidate is selling themselves pretty much. 2. Are you willing to relocate? * This question cannot be considered discriminating because it is informing the candidate that they may have to relocate 3. Can you explain to me a time when you went above and beyond to provide the best customer service possible? * This question falls within the guidelines to the EEOC when it comes to discrimination. They are simply asking the individual about a time they went the extra mile to help out a customer. 4. Can you describe a time when you work was criticized? How were you able to handle the situation? * Staying within the EEOC guidelines, they want to make sure that the individual does not make the same mistakes they had made at the other company they worked at. 5. Can......

Words: 1425 - Pages: 6

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 320 Homework 2

...Ayman Abdeldayem CMIS 320 A piano manufacturer wants to track all pianos it makes. Each piano has a unique serial number and a manufacturing completion date. Each instrument represents exactly one piano model, all of which have an identification number and model. The company produces thousands of pianos of a certain model, and the design is specified before any single piano exists. 1. Identify the degree and cardinalities of the relationship. The degree is the number of attributes in a relation. For this company, the attributes to distinguish between the products would be serial number, completion date, piano model, and identification number. This company makes thousands of pianos per model, and makes many different models. “Cardinality is the number of tuples in a relation,” in this case, a tuple would be a single piano model. So depending on the number of different piano models they produce will be the cardinality. 2. Express the relationships graphically with an E-R diagram. A vendor builds multiple types of tablet computers. Each has a type, identification number, and a name. The key specifications for each type include amount of storage and display type. The company uses multiple processor types, exactly one of which is used for a specific tablet type. The same processor can be used in multiple types of tablets. Each processor has a manufacturer and a manufacturer's unique code that identifies it. 1. Identify the degree and cardinalities of the......

Words: 326 - Pages: 2