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

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

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

Recommended textbooks for you

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…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

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…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON

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)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education

Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY