A car service centre needs a system to keep information about their customers and bookings about their cars.
Each customer has a unique ID and a name. Each customer can have more than one car registered in this system, and for each car the customer can book different services, such as express service, major service. Each booking is only for one of the two types of service. After the service, the staff will use the system to calculate the total cost and charge the customer.
An express service can be done within two hours. It is charged as follow: with an hour it is $100, and over an hour it is $150. This charge coves the labour cost and consumable materials, such as engine oil, etc.
A major service is done according to the car manufacture’s manual, the cost is based on the how many hours of the major service plus the consumable materials cost. The hourly labour cost is $50. For example, a major serve of 6 hours plus $100 material cost (the material cost will ben entered by staff when calculating the total cost) will cost $50 X 6 + $100 = $400.
A design has been made of the system, and is presented in the class diagram below. See image.
A snapshot of a customer’s data may look like what shown in the diagram below. See image.
The car service centre staff can use the system to:
Assume that we can take 100 to be the maximum number of customers, and each customer has maximum 10 cars. For each car the system will keep the recent 50 service records.
Write a program, called CarServiceBooking, that presents the following menu:
== Car Service Booking System ==
1. Add a customer
2. Add a car
3. Make a booking
4. Retrieve details of a booking
5. Modify a booking
6. Cancel a booking
7. Calculate service cost
8. Retrieve a customer record by the id
9. Save all the data to a text file
Please enter an option (1-9 or E):
And the user can select the above options to call relevant functions.
Include enough exception handling features to make the menu program robust.
Additional task for CSE4IOO Students: Implement a VIPCustomer class, subclass of Customer, and the service charge is discounted according to how many years the VIPCustomer is with the car service center, for example 5 years 5% off, 10 years 10%. Add an item in the menu to add VIP customers.