Question: can you help me with this code? i already have a decent start but im unsure how to use the getline() function in this program

A parking lot charges different rutes depending on the type of chick. Type Type Code First Rate Second Rate Car $1.25 hur fint 2 hours 51.50 heater fishes Truck T 52.75 hur fint 2 hour $3.75 her first 2 hours Bus 3 59.50.hr fine how 56.75 alter the first hour For example, if a bus has parked for 4 hours, then the total cost is calculated as follones $9.50 (for the fint I hours) + 3*$6.75 (for the last three houn)-$29.75 Write a program named parking.cpp that does the following Prompts the use for the type of chicle they are parking, wachat variable and the letters and to track their vehicle information Asks for the number of bours parked. For simplicity, all times are used up to the next hour (use ces from the cematholibrary). Calculates their total and then print a parking invoice as shown in the complet For getting the vehicle license plate from the input, you will need to the gene function. In doing so, you cither need to have cin.Ignore the efore the gatline) or execute the gene twice. This will clear the letter from the presets statements Sample Outputs Sample Output 1 - User Enters Invalid Vehicle Type Enter the vehicle type 'C' for car. " for truckfor hun: * That is an invalid vehicle type Sample Output 2 - Normal Program Execution Enter the vehicle type (C for car, fot trock, for bus): C Enter the number of hours parked: 4. What is the Hoense plate ABC 1234 Vehicle Type: Car Time: 4 hours License Plate: AC 12) Amount Due (5): 5.5 Enter the vehicle type (c' for car. " for track for busTV Intet the number of hours parked: 9.5. What is the license plate? 3CD 8678 Vehicle Type: Truck Time: 10 hours Licence Plates JCD 867 Amount Due (9) 35.5 Enter the vehicle type f*c* for car. *** for truck.*' for bus): B Enter the number of hours parked: 2.70 What is the license platesas 4556 Vehicle Type: Bus Time: 3 hours License Mate: SBS 4556 Amount Due (5): 23 Using the previous program as base. Write a program sumed formatted.cpp that displays the labels and values in a more readable fashion. Refer to the sample output below for more info. Your program autput must match the sample output exactly! Pay special mention to the last line in each program . The Ssign must be right next to the start of the dollar amount There should only be two decimal digits The outputs show 2 columns as shown in the sample output The first and second column prefix desetipiees Veile Type. Amount Dutetc.) must be right justified Sample Output - Normal Program Execution Enter the vehicle type pc for care te for truck, 'for bun): Enter the number of hours parked: 4. What is the Ilonse plate? ABC 123 vehtele Type: Car Time: 4 hours License Plate: ABC 123 Amount Due: $5.50 Enter the vehicle type ice for car, I tor truck. 'B' for bus): TM Enter the number of hours parked: 9.5 What is the license plate? JCD 3678 Vehicle Type: Truck License Plate: JCD 8678 Time: 10 hours Amount Due: $35.50 Enter the vehicle type 'C' for car, for truck, 'B' for bus)8 Enter the number of hours parked: 2.7 What is the license plate? SBS 4556 Vehicle Type: Bus License Plate: 585 4556 Amount Due: $23.00
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
