Question: 1. Using Java define a class person with below properties: Name, age, address with settlers and getters, define parameterized constructors to initialize the values and
1. Using Java define a class person with below properties: Name, age, address with settlers and getters, define parameterized constructors to initialize the values and also define a public method printPersonDetails() to print values Now Define a class Student, which should inherit from Person. Properties: SchoolName, currentClass. Getters,setters to these parameters and constructors to initialize values. Also define Public method to printStudentDetails() to print name,age,address,schoolName,currentClass
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
