0% found this document useful (0 votes)
81 views2 pages

Car Repair

Uploaded by

sheikhshessi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
81 views2 pages

Car Repair

Uploaded by

sheikhshessi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

CSC 2134 Programming I with C++ Chapter 3 1

Programming Assignment: Car Repair


For this programming assignment, create a car repair program that prompts the user to enter
information about a customer, the customer’s vehicle, and the work performed on the customer’s
vehicle. Your program should then display the final car repair bill on the computer screen.
Your program should accomplish the following:
1. Prompt the user to enter the following information:
a. Information about the customer (name, street address, city, state, zip code, phone
number).
b. Information about the customer’s vehicle (make, model, year).
c. Information about the work performed (brief description, labor hours needed, cost of
parts).
2. Use a labor cost amount of $100.00 per hour and a sales tax rate of 7.0%.
3. Calculate the following:

Variable Formula
subtotal subtotal = labor cost per hour * number of labor hours + parts cost
sales tax sales tax = sales tax rate * subtotal
total repair bill amount total repair bill amount = subtotal + sales tax

4. A screen shot of a sample run for this program is shown below. Design your program so it looks
exactly like the one shown in the screenshot. Use two fixed-point decimal places for all numeric
output (cout << setprecision(2) << fixed). Use left and right stream manipulators to align all
string and numeric output exactly as it is shown in the screen shot.
2

5. Write functions in your program that perform the following


a. read data from the keyboard
b. calculate values
c. display results
6. Test your program with the data shown in the screen shot above to ensure that your program
generates correct output.

Saving your C++ File


Save your C++ file as: <your last name>_<your first name> Car repair

Add Comment Statements


Add comment statements at the top of your program that describe the following: Project, Programmer,
Date, and Description. Also, add comment statements throughout the program that describe variables,
constants, formulas, and output operations.

Submit your C++ File in Canvas


Make sure you have checked your program in regards to the grading criteria found in the Programming
Assignment Grading Criteria.pdf file under Course Documents on the Modules page. When you finish,
submit your C++ (.cpp) file in Canvas in the appropriate drop box (do not submit the executable .exe
file).

You might also like