Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Relational Database And SQL

Authors: Lucy Scott

3rd Edition

1087899699, 978-1087899695

More Books

Students also viewed these Databases questions

Question

What were the issues and solutions proposed by each team?

Answered: 1 week ago