Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

a. Write a class Person. It shouldhave the data members name and age b. Write a

ID: 3614016 • Letter: A

Question

a.      Write a class Person. It shouldhave the data members name and age

b.      Write a class Student. Student isa person. Student should have the data members GPA and school.

c.      Write a class Undergrad Student.Undergrad student is a student. An undergrad student will have thedata member year (e.g. freshman, sophomore, junior, senior )

d.      Write a class Teacher. Teacher isa person. Teacher should have data members subject and salary

e.      Define get and set methods for thedata members of each class.

f.       Write parameterizedconstructor for each class. Use super keyword to call constructorof base class from derived class.

g.      Write a class Inheritance Test inwhich instantiate an object of each of the above classes. For e.g.person1, student1, teacher1 etc.

h.      Display the name of each objectinstantiated in the Inheritance Test class.

i.       Display the GPA of theobject of graduate student class.

j.       Display the age of theobject of undergraduate student class.

Explanation / Answer

that is 4 classes, you should ask one at a time...

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote