Computer Science, asked by gowsikkdgk, 9 months ago

Hi please write the c++ code and execute code for below requirements, Program : Vehicle Registration system Requirements: Base class : Vehicle (Ideally an abstract base class) Derived class : Two_wheeler, Three_Wheeler, Four_Wheeler Each vehicle should have: · Member variables : regNumber_m (int32), owner_m(string : owner name) type_m (Should be enum, describes if it is 2/3/4 wheeler) · Default Constructor should set appropriate default values for members. · Parameterized constructor should take all member values · Copy Constructor should assign values for all members · Overloaded assignment operator should assign values for all members · void show() : should display all values · Note: Each method should display “method entry”. Ex: Whenever Parameterized constructor is called, it should display “Parameterized constructor …” apart from its intended functionality. · displayVehicles() : This method prints each Vehicle (should use Vehicle::show()). · SearchVehicle(int num): Displays details of vehicle, if found using num. Otherwise displays “Vehicle not found with Registration number ”. Main: § Read the number of vehicles § Read type, number, owner_m for each vehicle § Dynamically create the object using type and other values (new operator). § Add the object to appropriate STL container § Call displayVehicles() § Prompt user to input a number and Call SearchVehicle() method Sample output: Two Wheeler: Number : 9999 Owner : Aneesh Four Wheeler: Number : 1234 Owner : Nikhil

Answers

Answered by mithleshmeval
2

Answer:

i dont now td8tdxiggxut8rsl7tdi63syfzo6esi5r7o

Similar questions