Write a program in Java that performs the following tasks: Creates a class called Person having attributes personName, personID. Creates a subclass called Student of Person class having attributes...

1 answer below »

Write a program in Java that performs the following tasks:



  • Creates a class called Person having attributes personName, personID.

  • Creates a subclass called Student of Person class having attributes stdGPA, stdMajor.

  • Creates a subclass called Teacher of Person class having attributes teacherCourse, teacherSalary.

  • Write the constructors for Person, Student and Teacher class to initialize the attributes(fields).

  • Write a method displayDetails() in Student and Teacher class to print all attributes of superclass and subclass.



Answered 14 days AfterJun 02, 2022

Answer To: Write a program in Java that performs the following tasks: Creates a class called Person having...

Kshitij answered on Jun 17 2022
91 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here