Question: Java Program: Create an abstract class VEHICLE which has at least one abstract method. Create three concrete classes BIKE,CAR,BUS which are subclasses of the VEHICLE
Java Program:
Create an abstract class VEHICLE which has at least one abstract method.
Create three concrete classes BIKE,CAR,BUS which are subclasses of the VEHICLE class.
Use three different implementations inside the concrete classes for the abstract method.
Create a test class.
Inside the testclass create 3 objects of VEHICLE class and each object can access one of the subclass methods.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
