Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PLEASE HELP ME WITH THIS PROBLEM. PROVIDE A COMPILED SOURCE CODE AND OUTPUT Problem 2. (70 points) In this problem, we are going to reuse
PLEASE HELP ME WITH THIS PROBLEM. PROVIDE A COMPILED SOURCE CODE AND OUTPUT
Problem 2. (70 points) In this problem, we are going to reuse the Person class created in the previous problem. Therefore, first make sure that you have already created Person.java based on the description provided above Modify the Person class, by implementing Comparable interface. Therefore, you should implement the unimplemented method from the Comparable interface inside the Person class. For comparing to persons, compare their last-names followed by their first-names. (5 points) . Create a subelass of Person, called Employee, such that it can keep extra information of a person including year of hiring, annual salary, vacation days, and unused vacation days. Provide required setter/getter methods for this class. (15 points) Create a subclass of Employee, called Manager, which also has monthly bonus, and the list of all her/his employees. Provide required setter/getter methods for this class. (15 points) .Create a class, called Company, with the following information: name of the company, starting year, and the list of all its employees/managers. Provide required setter/getter methods for this class. (15 points) .Create a tester class, called MyCompany, in which you should test all the above classes by creating a company, adding some employees/managers into it, two listings of the company's employees/managers, one sorted by last-names, and one sorted by each manager and then her/his employees. (20 points) Java file names: Person.Java, Employee.java, Manager.java, Company java, and MyCompany javaStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started