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:

  • Add a customer (enter details such as id, name.)
  • Add a car (for a customer, enter car registration)
  • Make a booking (for a customer’s car, enter service date, service type)
  • Modify a booking (change the service date and service type)
  • Cancel a booking (of a customer)
  • Calculate service cost (given the car registration and service id, calculate and display the cost)
  • Retrieve a customer record by the id (including the customer’s cars, bookings, and service charges)

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.

Task:

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
E. Exit
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.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.