Reference no: EM133337589
Console / GUI-based Car Rental project
GUI project
TG Enterprises is a new rental car company; they have a limited number of cars to be rented. When a customer rents a car, he needs to buy insurance. There are two types of insurance: liability insurance and comprehensive insurance. Also, he should pay a 5% tax on the rental cost (no tax on the insurance). The following table shows the cars that the company owns, the daily cost of rent, and the daily insurance.
You are required to write a program that helps this new company manage its business. The system will be used by an employee in the company. Your program should have the main menu as follows:
Console:
GUI:
Option 1 (Car Rental):
When a user enters 1, the following menu is displayed:
GUI:
Then the user needs to select the car to be rented by selecting a number from 1 to
3. When the user, for example, selects 1, the system should ask the user how many days the car will be rented, the insurance type, then display the cost details as follows:
GUI:
When calculating the cost, please note that tax includes only the cost of rent, not the insurance cost. After that, the system displays the message "More operations? [Y/N]". If the user enters "Y", the system will display the main menu again. If the user enters 'N', the system stops.
Please note that the number of available cars is updated based on the previous operation. Therefore, if the user selects a car model that has no available cars (zero), the system should display "This type of cars is not available now."
Option 2 (Car Return)
When the user enters 2 in the main menu, the system will ask the user to enter the type of car that is returned. This will update the number of available cars.
GUI:
Option 3 (Print the totals): If the user enters 3 in the main menu, the system will display the totals of all previous operations.
GUI:
Input validations:
1- In the main menu, only 1, 2, and 3 are accepted. If the user enters anything else, the system keeps asking the user to enter a valid option:
2- When the car type to be rented is input, only 1, 2, and 3 are accepted.
3- When insurance type is input, only the letters "L", "I", "F", and "f" are accepted.
4- When the car type to be returned is input, only 1, 2, and 3 are accepted.
5- When answering the question "More operations?", only 'y', 'Y', 'N', and 'n' are accepted.
Attachment:- Car Rental project.rar