Create a subclass Person from an abstract class Name. The Name class has two attributes: first name and last name. The Person class, apart from inherited attribute, has four attributes: street, city,...


Create a subclass Person from an abstract class Name. The Name class has two attributes:<br>first name and last name. The Person class, apart from inherited attribute, has four<br>attributes: street, city, state, and zip_code (int). Create two subclasses Studennd Faculty<br>of the Person class start with a Person class with six attributes: first name, last name,<br>street, city, state, and zip code. Student has two new attributes: branch and<br>year of graduation. The Faculty has two more attributes: specialization and salary. Every<br>class has a constructor to set the attributes and sub-class constructors use super class<br>constructors. Similarly Every class has overridden method Display() to display all attributes<br>of the class. Display method should display inherited attributes through super class method<br>Write a main() method that tests in another class Testdetails.<br>

Extracted text: Create a subclass Person from an abstract class Name. The Name class has two attributes: first name and last name. The Person class, apart from inherited attribute, has four attributes: street, city, state, and zip_code (int). Create two subclasses Studennd Faculty of the Person class start with a Person class with six attributes: first name, last name, street, city, state, and zip code. Student has two new attributes: branch and year of graduation. The Faculty has two more attributes: specialization and salary. Every class has a constructor to set the attributes and sub-class constructors use super class constructors. Similarly Every class has overridden method Display() to display all attributes of the class. Display method should display inherited attributes through super class method Write a main() method that tests in another class Testdetails.

Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here