Question: Programming in C++ D leam.zybooks.com C Chegg.com zy 4.11. LAB 4B: Automobile service cost = zyBooks 4.11: LAB 4B: Automobile service cost My library >


Programming in C++
D leam.zybooks.com C Chegg.com zy 4.11. LAB 4B: Automobile service cost = zyBooks 4.11: LAB 4B: Automobile service cost My library > CSE 102: Algorithmic Thinking and Programming home Overview e zyBooks catalog Help/FAQ To create a program that calculates the cost and change for services using if-statements. Objectives To gain proficiency with the following: Nested if-statements Multi-branch if-statements Incremental development Description For this program, you should prompt the user for an automobile service and a payment amount and then calculate how much change the user should receive, according to this list of services: oil change - $ 35 tire rotation --S 19 car wash --$7 If the user selects a service not shown in the list, you should display an appropriate message. Also, if the payment is not enough to cover the service an appropriate error message should be displayed. To complete this program, consider the following incremental process. (1) Prompt the user for an automobile service. After prompt user for the payment amount. forget to add a newline after each prompt. Then output the user's input as follows: Ex: Enter desired auto service: oil change You entered: oil change How much are you paying? You have paid: $ 41 D leam.zybooks.com zy 4.11. LA 48: Automobile service cost C Chegg.com e zyBooks catalog Help/FAQ = zyBooks 4.11: LAB 48: Automobile service cost My library > CSE 102: Algorithmic Thinking and Programming home (2) Next, output the price of the requested service and the change amount as follows: Ex: Erster desired auto service: oil change You entered: oil change How much are you paying? You have paid: $ 41 Cost of oil change: S 35 You are getting $ 6 change back from your $ 41 . (3) Implement the error messages: Text If the user enters a service that is not listed above, then output the following error message: Error: Requested service is not recognized If the user enters a payment less than the service cost, then output an error message like this: Error: Your paid amount is not sufficient for the cil change service Don't forget to output the corresponding service name (oil change/tire rotation/car wash) as well. Once you have received 100%, for extra practice, try to change the program so that the output has the dollar sign right next to the cost instead of having a space between them. Again, zyBooks will retain your highest score, so there is no harm in experimenting with other ways solve the problem or change it slightly to get extra practice. 301826.1775430 LAB ACTIVITY 4.11.1: LAB 4B: Automobile service cost 0/25
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
