Question: LANGUAGE: JAVA create an abstract base class person that will have the following member fields: name, id, address. Address will be defined by address class

LANGUAGE: JAVA

create an abstract base class person that will have the following member fields: name, id, address.

Address will be defined by address class and necessary to define and address: street, city , zip code and country(country will have a default value USA

usage of address class in the person class is form of composition. Extending the abstract person class will create 2 non abstract classes: employee and student

Employee class: salary, social security nub (SSN). When we perform get on SSN it will only return the last 4 digits the following format (###-##-1234)

student class with have gpa and number of credits completed

to test, create an application class with public void main string method. it should create 5 instances. of employee and 5 of student class. use data structure such as list<>or[] to store the instances. Print (system.out.println) the name and salary of all employees. similar print the name, address and 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!