Alshrooq is a new rental car company; they have limited number of cars to be rented. When a customer rent a car, he needs to buy an insurance, there are two types of insurance: liability insurance and comprehensive insurance. Also, he should pay 5% tax of the rental cost (no tax on the insurance). The following table shows the cars that the company owns, and the daily cost of rent, and the daily insurance.
You are required to write a program that helps this new company manage their business. The system will be used by an employee in the company. Your program should have the main menu as follows:
Option 1 (Car Rental):
When user enters 1, the following menu is displayed
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, the display the cost details as follows
When calculating the cost, please note that tax includes only the cost of rent but not the insurance cost.
After that, the system displays 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 car (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 the car that is returned. This will update the number of available cars.
Option 3 (Print the totals):
If the user enters 3 in the main menu, the system will display the totals of all previous operations.
All options in the system should be validated, these include:
1-In the main menu, only 1,2,3 are accepted. If the users 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,3 are accepted.
3‐ When insurance type is input, only the letters “L”, “l”, “F”, “f” are accepted.
4‐ When the car type to be returned is input, only 1,2,3 are accepted.
5‐ When answering the question “More operations? [Y/N]”, only ‘y’, ‘Y’, ‘N’, ‘n’ are accepted.
Start implementing the main menu, then implement the three main functionalities of the system one by one assume the program will be executed only for one time. Then add the validations for the inputs, and finally update the program so it repeats until the user enters “N” for the question “More operations?”