Question: Lab Purpose Practice creating C++ from creating a program plan (algorithm) to entering the program instructions, declaring variables, if statements, getting input from the user
Lab Purpose Practice creating C++ from creating a program plan (algorithm) to entering the program instructions, declaring variables, if statements, getting input from the user input file and displaying output in the console window, writing it to an output file as well as running and debugging it Always bring to class 1. Gaddis' book, How-to handouts from Canvas and your class notes 2. This assignment sheet & the grade sheet for this lab already printed out. 3. USB Flash drive(s) or other storage media. Mandatory Instructions Write a C++ program that could be used by Hertz car Rental Compa It will ask the user a series of questions trying to determine what kind of car the user needs to rent and provide a final rental cost for the vehicle. Regular price of a daily rental for a compact car is S38.60, while for a full-sized car it is $45.70. Ask the user the following questions and perform the described tasks. Your ERROR. Bye. and program should end. You should use a variable of char data type to capture user's input. Question : Display Rent a car? IY or NI and user will enter Y or N on the same line s should use ONLY nested if/else statements. You should validate user's input and in every case when as unexpected answer is given you should display Answer of Y Display You want to rent. Program will continue with next question. Answer of N Display You entered "NO". Bye. Program ends. Any other answer Display ERROR. Bye. Program ends. Question2: Display Compact or Full-sized? IC or Fl and user will enter C or F on the same line Answer of C Display You selected "Compact". Program will continue with next question. Answer of F Display Your selected "Full-sized". Program will continue with next question. Any other answer Display ERROR. Bye. Programe Question3: Display Have a coupon? Y or NI and user will enter Y or N on the same line Answer of Y Display You have a coupon. Apply 7% discount. Display Your daily rental rate is SXX.XX. Answer of N Display You have no coupon. Display Your daily rental rate is SXX.xx. Any other answer Display ERROR. Bye. Program ends. NOTE: This is provided only as a sample of output, not as validation of your own results. ent a car? [y or N] Y ou want to rent onpact or Full-sized [C or F] C ou seleeted "Compact aue a coupon? [Yor N] Y ou have a coupon our daily rental rate is 42. ress any key to continue Log the transcript of user's responses to an output file called "lab9 output.txt"List ALL possible transcripts of this program running in your grade sheet
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
