Question: Write a java Program for inheritance and mention Vehicles as parent class and Bike and Car as child classes. Define three data member and
Write a java Program for inheritance and mention "Vehicles" as parent class and "Bike" and "Car" as child classes. Define three data member and 2 data function in each class. Override functions of parent class in child classes. Parent class implements an interface "MyInterface". And mention all functions in this interface
Step by Step Solution
There are 3 Steps involved in it
Heres a Java program that demonstrates inheritance with a parent class Vehicles and two child classe... View full answer
Get step-by-step solutions from verified subject matter experts
