Question: Language: Java Create an abstract base class person. Person Object will have the following member fields: Name, ID, Address. Address class: Street, city, zip code,

Language: Java

Create an abstract base class person. Person Object will have the following member fields: Name, ID, Address.

Address class: Street, city, zip code, country. The usage of the address class is the form of composition.

Create 2 concrete classes from an abstract person class employee class and student class.

Employee class with have the additional field: salary/ssn. for ssn we perform get on ssn it will only return the last 4 diigiys in the following format ###-##-1234

student class will have more fields: gpa/# of credits completed

To test created class, create an application only class with public void main (string [] args) method. app class should create 5 instances of employee and 20 instances of a student.

print name/salary of all employees. print the name, address & gpa of all created students.

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!