Q#1. 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 SUBJECT:JAVA PROGRAMMING
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:
Q#1. 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
SUBJECT:JAVA
Step by step
Solved in 2 steps with 3 images