Challenge

Project 3

PROJECT VEHICLE MAINTANANCE

First I have created a vehicle class as the base class with protected members like make, model ,year and odometer it provides getter and setter methods for these attributes.It includes a pure virtual function getType() to be implemented by the derived class.


Fuel vehicle class is an abstract class from vehicle class, which provides check for oil change and defines a pure virtual method getFuelType()

Gascar,dieselcar and Electriccar: Derived from Vehicle and FuelVehicle (where applicable), and implement specific behavior for fuel type and maintenance checks (e.g., tire rotation and power recharge).

Inventory: Manages a list of vehicles and supports operations like adding, updating, listing, and removing vehicles.


Hence get the output asper the requirement and sussesfull implemented the program.

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.