Introduction To Programming
Complete Exercise 6 on page 121 using the following instructions.
Lesson 1 Project
Scenario
A personal trainer asks you to create a program to calculate and display clients’ body mass index (BMI). Use the information in Exercise 6 on page 121 to create this program by
- Creating the pseudocode for this program
- Creating a flowchart for this program
Hint: Use RAPTOR, Visio, or Microsoft Word’s Drawing toolbar to create the flowchart.
Save your time - order a paper!
Get your paper written from scratch within the tight deadline. Our service is a reliable solution to all your troubles. Place an order on any task and we will take care of it. You won’t have to worry about the quality and deadlines
Order Paper NowGrading
Your instructor will grade your project as follows:
• Used the lessons learned in this course to create the pseudocode for this program 25 points
• Created the modules for an effective program25 points
• Created a flowchart for this program using lessons learned in this course25 points
• Used the appropriate flowchart shapes to create a flowchart 25 points
TOTAL POINTS100 points
Complete Exercise 6 on page 121 using the following instructions.
Scenario
A personal trainer asks you to create a program to calculate and display clients’ body mass index (BMI). Use the information in Exercise 6 on page 121 to create this program by
1. Creating the pseudocode for this program
2. Creating a flowchart for this program
Hint: Use RAPTOR, Visio, or Microsoft Word’s Drawing toolbar to create the flowchart..
Grading
Your instructor will grade your project as follows:
| • Used the lessons learned in this course to create the pseudocode for this program | 25 points |
| • Created the modules for an effective program | 25 points |
| • Created a flowchart for this program using lessons learned in this course | 25 points |
| • Used the appropriate flowchart shapes to create a flowchart | 25 points |
| TOTAL POINTS | 100 points |
Exercise 6 in Chapter 2
Programming Exercises
1. Personal Information
Design a program that displays the following information:
· Your name
· Your address, with city, state, and ZIP
· Your telephone number
· Your college major
2. Sales Prediction
A company has determined that its annual profit is typically 23 percent of total sales. Design a program that asks the user to enter the projected amount of total sales, and then displays the profit that will be made from that amount.
Hint: Use the value 0.23 to represent 23 percent.
3. Land Calculation
One acre of land is equivalent to 43,560 square feet. Design a program that asks the user to enter the total square feet in a tract of land and calculates the number of acres in the tract.
Hint: Divide the amount entered by 43,560 to get the number of acres.
4. Total Purchase
A customer in a store is purchasing five items. Design a program that asks for the price of each item, and then displays the subtotal of the sale, the amount of sales tax, and the total. Assume the sales tax is 6 percent.
5. Distance Traveled
Assuming there are no accidents or delays, the distance that a car travels down the interstate can be calculated with the following formula:
Ditance=Speed×TimeDitance=Speed×Time
A car is traveling at 60 miles per hour. Design a program that displays the following:
· The distance the car will travel in 5 hours
· The distance the car will travel in 8 hours
· The distance the car will travel in 12 hours
6. Sales Tax
Design a program that will ask the user to enter the amount of a purchase. The program should then compute the state and county sales tax. Assume the state sales tax is 4 percent and the county sales tax is 2 percent. The program should display the amount of the purchase, the state sales tax, the county sales tax, the total sales tax, and the total of the sale (which is the sum of the amount of purchase plus the total sales tax).
Hint: Use the value 0.02 to represent 2 percent, and 0.04 to represent 4 percent.
7. Miles-per-Gallon
A car’s miles-per-gallon (MPG) can be calculated with the following formula:
MPG=Miles driven/Gallons of gas usedMPG=Miles driven/Gallons of gas used
Design a program that asks the user for the number of miles driven and the gallons of gas used. It should calculate the car’s miles-per-gallon and
display the result on the screen.
Exercise 6 on page 121
Programming Exercises
1. Kilometer Converter
Design a modular program that asks the user to enter a distance in kilometers, and then converts that distance to miles. The conversion formula is as follows:
Miles=kilometers×0.6214Miles=kilometers×0.6214
2. Sales Tax Program Refactoring
Programming Exercise 6 in Chapter 2 was the Sales Tax program. For that exercise you were asked to design a program that calculates and displays the county and state sales tax on a purchase. If you have already designed that program, refactor it so the subtasks are in modules. If you have not already designed that program, create a modular design for it.
3. How Much Insurance?
Many financial experts advise that property owners should insure their homes or buildings for at least 80 percent of the amount it would cost to replace the structure. Design a modular program that asks the user to enter the replacement cost of a building and then displays the minimum amount of insurance he or she should buy for the property.
4. Automobile Costs
Design a modular program that asks the user to enter the monthly costs for the following expenses incurred from operating his or her automobile: loan payment, insurance, gas, oil, tires, and maintenance. The program should then display the total monthly cost of these expenses, and the total annual cost of these expenses.
5. Property Tax
A county collects property taxes on the assessment value of property, which is 60 percent of the property’s actual value. For example, if an acre of land is valued at $10,000, its assessment value is $6,000. The property tax is then 64¢ for each $100 of the assessment value. The tax for the acre assessed at $6,000 will be $38.40. Design a modular program that asks for the actual value of a piece of property and displays the assessment value and property tax.
6. Body Mass Index
Design a modular program that calculates and displays a person’s body mass index (BMI). The BMI is often used to determine whether a person with a sedentary lifestyle is overweight or underweight for his or her height. A person’s BMI is calculated with the following formula:
BMI=Weight×703/Height2BMI=Weight×703/Height2
7. Calories from Fat and Carbohydrates
A nutritionist who works for a fitness club helps members by evaluating their diets. As part of her evaluation, she asks members for the number of fat grams and carbohydrate grams that they consumed in a day. Then, she calculates the number of calories that result from the fat, using the following formula:
CaloriesfromFat=FatGrams×9Calories from Fat=Fat Grams×9
Next, she calculates the number of calories that result from the carbohydrates, using the following formula:
CaloriesfromCarbs=CarbGrams×4Calories from Carbs=Carb Grams×4
The nutritionist asks you to design a modular program that will make these calculations.
8. Stadium Seating
There are three seating categories at a stadium. For a softball game, Class A seats cost $15, Class B seats cost $12, and Class C seats cost $9. Design a modular program that asks how many tickets for each class of seats were sold, and then displays the amount of income generated from ticket sales.
9. Paint Job Estimator
A painting company has determined that for every 115 square feet of wall space, one gallon of paint and eight hours of labor will be required. The company charges $20.00 per hour for labor. Design a modular program that asks the user to enter the square feet of wall space to be painted and the price of the paint per gallon. The program should display the following data:
· The number of gallons of paint required
· The hours of labor required
· The cost of the paint
· The labor charges
· The total cost of the paint job
10. Monthly Sales Tax
A retail company must file a monthly sales tax report listing the total sales for the month, and the amount of state and county sales tax collected. The state sales tax rate is 4 percent and the county sales tax rate is 2 percent. Design a modular program that asks the user to enter the total sales for the month. From this figure, the application should calculate and display the following:
· The amount of county sales tax
· The amount of state sales tax
· The total sales tax (county plus state)
In the pseudocode, represent the county tax rate (0.02) and the state tax rate (0.04) as named constants.
11. Hot Dog Cookout Calculator
Assume that hot dogs come in packages of 10, and hot dog buns come in packages of 8. Design a modular program that calculates the number of packages of hot dogs and the number of packages of hot dog buns needed for a cookout, with the minimum amount of leftovers. The program should ask the user for the number of people attending the cookout, and the number of hot dogs each person will be given. The program should display the following:
· The minimum number of packages of hot dogs required
· The minimum number of packages of buns required
· The number of hot dogs that will be left over
· The number of buns that will be left over


