Naz N.

asked • 12/05/19

please I need some help with java code

inheritance 1. Write a program represent the following class hierarchy 1.1. Person class a) which contain the following attributes: - Name Address .Gender -DateOfBirth b) And contain the following methods: .Constructor that take all attributes • getter & setter for each attribute .toString -clone equals 1.2. Employee class which inherit Person class a) which contain the following attributes: -role -department b) And contain the following methods: .Constructor that take all attributes getter & setter for each attribute - toString -clone - equals 1.3. Student class which inherit Person class a) which contain the following attributes: - student ID -classNo b) And contain the following methods: .Constructor that take all attributes - getter & setter for each attribute - toString -clone .equals 1.4. TestPerson class that perform the following: Create two objects from Employee class Assign each object with different values c) Compare two objects d) Create Employee reference that clone the first object c) Print all Employee objects created ) Create two objects from Student class Assign each object with different values Compare two objects i) Create Student reference that clone the first object j) Print all Student objects created


1 Expert Answer

By:

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.