Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 javaimage text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 10g SQL

Authors: Joan Casteel, Lannes Morris Murphy

1st Edition

141883629X, 9781418836290

More Books

Students also viewed these Databases questions

Question

What steps should Dynamic Duos owners take immediately?

Answered: 1 week ago

Question

What is the role in the single-family sector of the GSEs?

Answered: 1 week ago