Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How to do this program?(JAVA) A hierarchy of person contact types using inheritance. Define each of the following classes. The base class is the Person

How to do this program?(JAVA)

A hierarchy of person contact types using inheritance.

Define each of the following classes. The base class is the Person class. For the additional classes, extend the Person class.

Include the following data fields for each class.

Define constructors for each class.

Include get and set methods for each data field. The data fields should be declared private; the get and set methods should be public.

Write a short test program (which will hold the main method) to create test objects of each class, and print / output the data fields of each class object. Create at least one object of each class.

Finally, output the object data to an output file, named "Contact_Class.txt"

  • Base class = Person
    • Name
    • Phone number
    • Email
    • Address
    • Notes
    • Birthday
  • Business Contact
    • Company
    • LinkedIn link
    • Fax number
  • Personal Contact
    • Facebook / IG link
  • Family Contact
    • Relationship (sibling, parent, cousin, etc)
  • School contact
    • College
    • Major
    • Degree
    • Graduation year Year
should get and set methods be declared in all the classes.

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

Database Marketing The New Profit Frontier

Authors: Ed Burnett

1st Edition

0964535629, 978-0964535626

More Books

Students also viewed these Databases questions

Question

4. Give partial credit for partially correct answers.

Answered: 1 week ago