Question: 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

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!