Define a class named Person and its two subclasses named Student and Employee. Make Faculty and Staff subclasses of Employee. A person has a name, address, phone number, and email address and birthDate. A student has a department, and a class status (first year, second year, third year, fourth year, fifth year ). An employee has an office, salary, and date hired. Use the java.util.Date class to create objects for birthDate and date hired. A faculty member has office hours and a rank. A staff member has a title. Override the toString() and equal() methods in each class. toString() should return all info of the object. equal() method must check equality of employees based on salary and name, and equality of students based on name and class status i.e. two employees are considered equal if they have the same name and salary and two students are considered equal if they have the same name and class status. Write a test program in which you define objects from employee and student and make calls to at least 5 methods. Notes: 1- Chose reasonable data types for all attributes. 2- In every class there must be at least two constructors (a no-arg constructor + a constructor with parameters) 3- Define setter and getter methods in all classes. 4- You have to use the this and super keywords at least twice each.
Define a class named Person and its two subclasses named Student and Employee. Make Faculty and Staff subclasses of Employee. A person has a name, address, phone number, and email address and birthDate. A student has a department, and a class status (first year, second year, third year, fourth year, fifth year ). An employee has an office, salary, and date hired. Use the java.util.Date class to create objects for birthDate and date hired. A faculty member has office hours and a rank. A staff member has a title. Override the toString() and equal() methods in each class. toString() should return all info of the object. equal() method must check equality of employees based on salary and name, and equality of students based on name and class status i.e. two employees are considered equal if they have the same name and salary and two students are considered equal if they have the same name and class status. Write a test program in which you define objects from employee and student and make calls to at least 5 methods. Notes: 1- Chose reasonable data types for all attributes. 2- In every class there must be at least two constructors (a no-arg constructor + a constructor with parameters) 3- Define setter and getter methods in all classes. 4- You have to use the this and super keywords at least twice each.
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
![Define a class named Person and its two subclasses
named Student and Employee. Make Faculty and
Staff subclasses of Employee. A person has a name,
address, phone number, and email address and
birthDate. A student has a department, and a class
status (first year, second year, third year, fourth year,
fifth year ). An employee has an office, salary, and
date hired. Use the java.util.Date class to create
objects for birthDate and date hired. A faculty member
has office hours and a rank. A staff member has a title.
Override the toString() and equal() methods in each
class. toString(0 should return all info of the object.
equal() method must check equality of employees
based on salary and name, and equality of students
based on name and class status i.e. two employees are
considered equal if they have the same name and
salary and two students are considered equal if they
have the same name and class status.
Write a test program in which you define objects from
employee and student and make calls to at least 5
methods.
Notes:
1- Chose reasonable data types for all attributes.
2- In every class there must be at least two
constructors (a no-arg constructor + a constructor
with parameters)
3- Define setter and getter methods in all classes.
4- You have to use the this and super keywords at
least twice each.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F2bcb133a-d23d-44bc-a7a2-33255badc50a%2F53a4b747-d0a5-45a9-b95a-44bcc596c6f5%2Fbr227mh_processed.jpeg&w=3840&q=75)
Transcribed Image Text:Define a class named Person and its two subclasses
named Student and Employee. Make Faculty and
Staff subclasses of Employee. A person has a name,
address, phone number, and email address and
birthDate. A student has a department, and a class
status (first year, second year, third year, fourth year,
fifth year ). An employee has an office, salary, and
date hired. Use the java.util.Date class to create
objects for birthDate and date hired. A faculty member
has office hours and a rank. A staff member has a title.
Override the toString() and equal() methods in each
class. toString(0 should return all info of the object.
equal() method must check equality of employees
based on salary and name, and equality of students
based on name and class status i.e. two employees are
considered equal if they have the same name and
salary and two students are considered equal if they
have the same name and class status.
Write a test program in which you define objects from
employee and student and make calls to at least 5
methods.
Notes:
1- Chose reasonable data types for all attributes.
2- In every class there must be at least two
constructors (a no-arg constructor + a constructor
with parameters)
3- Define setter and getter methods in all classes.
4- You have to use the this and super keywords at
least twice each.
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY