Akshay Kolhapure 03 Feb,2015
Define an abstract class "car" with members reg_no, model, reg_date. Define two subclasses of this class "transportVehicles " (validity_no,start_date, period) and "privateVehicle" (owner_name, owner_address). Define appropriate constructors. Create n objects which could be of either transportVehicles or privateVehicle class by asking the user's choice. Display details of all "privateVehicle" objects and all "transportVehicles" objects.
To view program you need to login. Click here