Cmis Discussion 2

In: Computers and Technology

Submitted By zaih1981
Words 478
Pages 2
Program Description
Write a few lines of pseudo code to calculate the cost of a road trip. Prompt the user for the cost of gas, the cost of food, and the cost of lodging. Sum up the total cost and display the output.

Analysis
The point of the program is to calculate a total cost on a prospective road.

To produce these results I will be adding costGas, costFood and costLodging to get costTotal.

The final display will be in dollars.

I will be using a submodular approach with submodules: Welcome, Prompts, and DisplayOutput
Welcome – displays the welcome message
Prompts – simply prompts the user for required information of costFood, costGas and costLodging
DisplayOutput – displays the final result on the screen.

Program design
Main
//Declare Variables //Initialize Variables //Display welcome message Call Welcome

//Prompt for an input to get cost of gas. Store user’s input as costGas //Prompt for an input to get cost of food. Store user’s input as costFood

//Prompt for an input to get cost of lodging. Store user’s input as costLodging //Calculate by adding costGas, costFood and costLodging costTotal=costGas+costFood+costLodging //Display output
Call DisplayOutput

End

Submodule Welcome //Display welcome message

End //End Welcome
Submodule Prompts //Display Prompts

End //End Prompts

Submodule DisplayOutput //Display DisplayOutput

End //End DisplayOutput

Code(Pseudo-code)
Main
//This program will collect information for a road trip //It will prompt the user for Gas, Food and Lodging and will output the results of a Total cost. //CodeHistory: Created by AJA 3/19/2015 // Modified by AJA 3/26/2015 //Declare variables Declare costGas AS Float Declare costFood AS Float Declare costLodging AS Float Declare costTotal AS Float

//Initialize Variables…...

Similar Documents

Discussion 2

...Assignment #2 A. Punctuate the following sentences in a correct way 1.Are scientist sure there is water on Mars? 2.I don't know if I can help him,but I'll definitely try. 3.They say that the best things in life are free! 4 After we eat lunch, we're going to work on the chemistry project. 5.The test includes;reading,vocabulary,and grammar sections. 6.Bruce went running down the street, the huge rat was too much for him! B. correct the punctuation mistakes and add punctuation when necessary. 1.To get to Burlington ,you have to drive to the train station,take the train,and get a taxi. 2. Do you know where Maggie put the envelopes? 3.We need to print 200 newsletters this week—even more than last week! 4.Wow! 5.Randy looked at the ground, and sighed,it was all he could do. 6.The Train leaves in an hour;but you need to buy the tickets first! Write a letter to a friend about a movie you have seen or a book you have recently read. Dear Lindsay, I just read The hunger Games and Catching Fire, I cant believe I did it !They are so amazing,and good .I honestly recommend them to you; you like things like that action , horror, sci-fi and futuristic books .So I wonder why haven't recommended them to you before? Katniss is my new hero, Because even tho she got into trouble—didn’t expect to become such a role model in all of the district to cause that massive rebellion. This is some of the reasons why you should read them : They are a action packed......

Words: 320 - Pages: 2

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

Discussion Board Unit 2

...Discussion Board Unit 2 Comp101/1401B Introduction to Computers A. Questions for weekly discussions and conversations. 1. Why are clip art libraries useful, not only in Word , but also in PowerPoint? Clip art libraries are useful to show pictures to your words. They are great for making your documents or slide shows more exciting. Clip art actually can draw attention to get the readers to focus on the project or document itself. 2. What are the copyright laws that must be followed when using clip art? The right of legal use of clip art depends on the intent of the copyright owner. Copyrighted clip art is off limits for commercial use unless you have a written agreement with the copyright holder. For instance, if you sold Nike products in your store, you would have the right to use their logo for advertising. If you didn’t sell Nike products then it would be illegal for you to use their logo without permission. 3. When might it not be appropriate to use clip art? Clip art probably wouldn’t be appropriate in legal and professional documents. It wouldn’t be professional if clip art was used. B. If you have not used clip art before, find 2 sites on the internet, and provide at least 1 example of when each site could be used in a practical way. Include the type of clip art found at the sites, including categories or special interest areas for the site. The first site that caught my eye was ClipartHeaven.com. The clip art ranges......

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

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

Week 2 Lab Cmis 201 Programming

...CMIS 102 Hands-On Lab // Week2 Overview: This hands-on lab allows you to follow and experiment with the critical steps of developing a program including the program description, analysis, test plan, design, and implementation with C code. Program Description: This program will sum two integer numbers to yield a third integer number. It will also divide two float numbers to yield a third float number. Once the calculations are made the results of all the numbers will be printed to the output screen. Analysis: We will use sequential programming statements. We will define 3 integer numbers: a,b,c. c will store the sum of a and b. We will define 3 float numbers: f,g,h. h will store the quotient of f and g. Test Plan: To understand this program the following input numbers could be used for testing: a = 10 b = 20 c = a + b = 10 + 20 = 30 f = 75.0 g = 3.0 h = f/g = 75.0/3.0 = 25.0 Design using Pseudocode: // This program will sum two integer numbers to yield a third integer number. // It will also divide two float numbers to yield a third float number. // Declare variables Declare a,b,c as Integer Declare f as Float // Set values of Integers Set a=10 Set b=20 Set c=a+b // Print c 1 Print a,b,c Set f=75.0 Set g=3.0 Set h=f+g // Print h print f,g,h C Code The following is the C Code that will compile in execute in the online compilers. // C code // This program will sum two integer numbers to yield a third integer number. // It will also divide two float numbers to yield a......

Words: 457 - Pages: 2

Cmis Homework 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; ...

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