Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

More Books

Students also viewed these Databases questions

Question

=+working on a micro-multinational?

Answered: 1 week ago

Question

What is the most important part of any HCM Project Map and why?

Answered: 1 week ago