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
- 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
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started