You are on page 1of 2

If-Else & Switch-Case

 Two Program attached.Please check zip file.


 seen all the given codes for the file
“IfElseForgrams”.

Inheritance

Task: 01

a.There are 3 class files.Person,Student,Teacher.


c.Person.java is the superclass means its the
parent class.
d.Teacher.java is the subclass or child class which
extends person class
e.Student.java is also a subclass or child class
which extends person class.
g. Changed the inputs for Person, Teacher and
Student objects.

Task: 02

2.a.The name of the methods that are getting


ovrridden is, m2() and toString() methods.
2.b.@override keyword used for changing the
methods of parent class.
3.c. The function of the super keywoed is to invoke
the constructor or methods from super class.

Task : 03

check the attached files.

You might also like