A Teacher has office hours and a subject they teach. They also have a tenure status. Define the tenure status as a constant. The tenure status is either Senior or Junior, and is represented as an integer, where Senior is equal to 1, and Junior is equal to 2.
NOTE: READ CAREFULLY
Design a class named Person and a subclasses named Employee. Make Teacher a subclass of Employee.
A Person has a name, address, and e-mail address. An Employee has an office, salary.
A Teacher has office hours and a subject they teach. They also have a tenure status. Define the tenure status as a constant. The tenure status is either Senior or Junior, and is represented as an integer, where Senior is equal to 1, and Junior is equal to 2.
Each class should have a Default constructor, and a constructor that accepts all arguments. There should be appropriate calls to the superclass within the constructors.
Each class should also have getters and setters for each member variable.
Each class should have a toString method.
Note: You do NOT need to run this in a test
Trending now
This is a popular solution!
Step by step
Solved in 2 steps