Question: C++ PROGRAM Design an OOP program that can be used to create, update and read a file, which contains car and service records/data. Your program
C++ PROGRAM
Design an OOP program that can be used to create, update and read a file, which contains car and service records/data.
Your program should create and use a Car class to store and process the car's data, such as the car model, license plate number and year when the car was made. The program should also use a Service class to store and process the service's data, such as the service description, number of months between two services, date of the last service and the date of the next service. The program should get all necessary data from the user except the date of the next service which will be calculated. The Service class should contain a function that will compute the date of the next service using the date of the last service and the number of months between two services. Please note that you may design and use additional class(s) as well.
The program should enable the user to: -
- Create a file and store car and service records/data into the file
- Search for a specific car in the file using its licence plate number and display all its service records
- Search for a specific date and display all cars that have to be serviced on this date:
- Delete and/or edit car and service records in the file.
- Program requirements:
It is required to use the following C++ language constructs/tools:
1. File I/O
2. Inheritance or composition
3. Operator functions (at least two)
4. A static member function which displays the current system date and time
5. Constructor functions.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
