Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Implement classes Person, Student, Employee, Faculty and Staff. These represent the people and categories of people you might find at a college or university. The

image text in transcribed

Implement classes Person, Student, Employee, Faculty and Staff. These represent the people and categories of people you might find at a college or university. The classes are related by inheritance as follows Employee and Student both extend Person Faculty and Staff both extend Employee " " Each class should have the following instance variables Class Instance Variable Iypes String Strin Strin Date* Person name email sa date hired Research Interest String Employee Faculty Staff Student String class status String * Some examples of class status are: "fresh man and "sophomore" For D ate, use the standard java date class https://docs.oracle.com/javase/8/docs/api/java/util/Date html The classes should also have the following methods getters and setters for all of instance variables, except " o Date hired has no setter A constructor for each class that initializes all the instance variables for that class both o For example, the Staff constructor will have 4 parameters: title, salary, name, and Override toString in each class to print the name of the class followed by the name of the o For example, if Bob is a staff member, the toString method should return Staff. Bob inherited and defined in the class itself, except for date hired email address The constructor for employee initialized the hire date to the current date o person, separated by a colon. o Another example, if Ann is a faculty member, the toString method should return Faculty: Ann Implement classes Person, Student, Employee, Faculty and Staff. These represent the people and categories of people you might find at a college or university. The classes are related by inheritance as follows Employee and Student both extend Person Faculty and Staff both extend Employee " " Each class should have the following instance variables Class Instance Variable Iypes String Strin Strin Date* Person name email sa date hired Research Interest String Employee Faculty Staff Student String class status String * Some examples of class status are: "fresh man and "sophomore" For D ate, use the standard java date class https://docs.oracle.com/javase/8/docs/api/java/util/Date html The classes should also have the following methods getters and setters for all of instance variables, except " o Date hired has no setter A constructor for each class that initializes all the instance variables for that class both o For example, the Staff constructor will have 4 parameters: title, salary, name, and Override toString in each class to print the name of the class followed by the name of the o For example, if Bob is a staff member, the toString method should return Staff. Bob inherited and defined in the class itself, except for date hired email address The constructor for employee initialized the hire date to the current date o person, separated by a colon. o Another example, if Ann is a faculty member, the toString method should return Faculty: Ann

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Structure Of The Relational Database Model

Authors: Jan Paredaens ,Paul De Bra ,Marc Gyssens ,Dirk Van Gucht

1st Edition

3642699588, 978-3642699580

More Books

Students also viewed these Databases questions

Question

u = 5 j , v = 6 i Find the angle between the vectors.

Answered: 1 week ago