Question: In java TASK: Create three classes, Human, Professor, and Student, that have the following properties: The Human class should be an abstract class. It should

In javaIn java TASK: Create three classes, Human, Professor, and Student, that have

TASK: Create three classes, Human, Professor, and Student, that have the following properties: The Human class should be an abstract class. It should have a private String instance variable name. It must have a constructor that has one String parameter and sets the name instance variable to the constructor's argument. It must also have a no-parameter public instance method called getName that returns the name instance variable Both the Professor and Student classes must extend from the Human class The Professor class must have a public ArrayList instance variable called students that is initialized by the constructor. The Professor constructor itself must have one parameter of type String, which is the desired name of the Professor object The Student class must have a public ArrayList instance variable called professors that is initialized by the constructor. The Student constructor itself must have one parameter of type String, which is the desired name of the Student object

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!