Question: in java pls Design a class named Person and two of its subclasses named Student and Employee. Make Faculty and Staff subclasses of Employee. A

in java pls

Design a class named Person and two of its subclasses named Student and Employee. Make Faculty and Staff subclasses of Employee.

A person has a name, address, phone number, age and email address and implement a method getAge():int.

A student has a class status (freshman, sophomore, junior, or senior) - define the status as a constant.

An employee has an office, salary, and date-hired of type MyDate.

A faculty member has office hours and a rank., and it implements a method salaryRange(int rank):int that returns:

1 if rank*years<10 return 1 (years is current year minus date-hired year)

2 if 10 <= rank*years < 20

3 if 20 <= rank*years

A staff member has a title.

Override the toString method in each class to display the class name and the person's name.

Write a test program that creates persons, students, employees, faculties, and staff, and invokes their toString() methods.

Draw the UML diagram for the classes.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!