Create a class car with make, model, year, OwnerName, RegisNo, Insurers as private fields. Create the following void methods getcarInfo, storeCarData and processcarInfo as public members of the class. • Start at the junction • Stop at AITCreate another derived class Commercial with car as it base class. The commercial class should have RegFees, Station,Route as it’s private member fields and CommeCar as it public method. At program execution stage the following methods are called in the main function getcarInfo, storeCarData of the base class and CommeCar. Using code snippets write a C++ program to solve the problem above. NB: All functions do not need function definitions but provide the function prototypes
OOPs
In today's technology-driven world, computer programming skills are in high demand. The object-oriented programming (OOP) approach is very much useful while designing and maintaining software programs. Object-oriented programming (OOP) is a basic programming paradigm that almost every developer has used at some stage in their career.
Constructor
The easiest way to think of a constructor in object-oriented programming (OOP) languages is:
Create a class car with make, model, year, OwnerName, RegisNo, Insurers as private fields. Create the following void methods getcarInfo, storeCarData and processcarInfo as public members of the class.
• Start at the junction
• Stop at AITCreate another derived class Commercial with car as it base class. The commercial class should have RegFees, Station,Route as it’s private member fields and CommeCar as it public method. At
Using code snippets write a C++ program to solve the problem above. NB: All functions do not need function definitions but provide the function prototypes
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 3 images