[SOLVED] Car Rental Fees

18.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon Program-3.zip (0.7 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
5/5 - (2 votes)

A car rental company uses the following table to help compute rental fees.

TABLE 9.3

Car Type Rate per Day Rate per Mile

Chevrolet 50.00 0.27

Corvette 85.00 0.45

Pontiac 53.00 0.32

Buick 60.00 0.32

Oldsmobile 60.00 0.35

Cadillac 70.00 0.40

Write a program to calculate car rental fees based on this table. The program should prompt the user to enter the name of the type of car that was rented, the number of days the car was rented, and the number of miles the car was driven. The program should search the table for a match on the car type. If there is a match, the rental fee is the number of days rented, times the rate per day, plus the number of miles traveled, times the rate per mile. The program should display the type of car, the number of days rented, the number of miles driven, and the rental fee. If the table search cannot find the car type in the table, display an appropriate error message. Write the program to process any number of rentals.

  • Program-3.zip