Question: Given code, please finish in Java!! 1. Organizational Structure This is a program to manage the Organizational Structure in a company. The program should allow

 Given code, please finish in Java!! 1. Organizational Structure This is

a program to manage the Organizational Structure in a company. The program

should allow us to: 1. Add employees 2. Generate the Org Chart

in a specific format (explained further below). 3. Remove employees 4. Move

Given code, please finish in Java!!

an Employee from one manager to another. 5. Count the number of

1. Organizational Structure This is a program to manage the Organizational Structure in a company. The program should allow us to: 1. Add employees 2. Generate the Org Chart in a specific format (explained further below). 3. Remove employees 4. Move an Employee from one manager to another. 5. Count the number of employees that ultimately report up to a given manager. The input for this program is a text file comprising of a series of commands and parameters that may look like this: 6 ,, If an employee with an id has been added, then subsequent additions of employees with the same id are ignored. If an employee's manager has not already been added, then the employee is considered to have no manager. Moving an Employee: The command is of the format move, employee id>, If an employee of that id does not exist, then do nothing. If an employee with the new manager id does not exist, then do nothing. The newly moved employee will be appended to the manager's list of reports, when the org chart is printed Subsequent adds will continue to be added to the end of the list of reports. Removing an Employee: The command is of the format remove, If an employee of that id does not exist, then do nothing. After removal, if the employee had any reports, they should now report to the removed employee's manager. These employees will show up in the same order as they did under their former manager, but after any current reports of the new manager. If the removed employee had no manager, then the reports will have no manager either. Counting Employees: The command is of the format count, This should return the total number of reports, including any indirect reports (all descendant reports), that the specified employee has. ne same der as they did under their former manager, but after any current reports of the new manager. If the removed employee had no manager, then the reports will have no manager either. Counting Employees: The command is of the format count, This should return the total number of reports, including any indirect reports (all descendant reports), that the specified employee has. The processing of the input file is already implemented. You only have to implement the Add, Print, Remove, Move, and Count methods below. Feel free to add any other class members or other classes, as needed. Helpful Tips: 1. Some users have suggested that using the "vertical layout" mode (an option that you can select next to the language selection drop down box), is helpful as you can view the exercise description on the side while you build your solution, instead of having to repeatedly scroll up and down. 2. Note that some passing cases is better than no passing cases. Please keep this in mind if you are refining your code as time is running out. Changes you make to pass one additional case may break previously working code. If you run out of time, you solution will auto submit. 65 v class OrgChart ! 66 V public void add(String id, String name, String managerId) 67 { 68 throw new UnsupportedOperationException(); 69 } 70 71 V public void print() 72 { 73 throw new UnsupportedOperationException(); I 74 } 75 76 V public void remove(String employeeId) 77 { 78 throw new UnsupportedOperationException(); 79 } 80 81 public void move(String employeeId, String newManagerId) 82 { 83 throw new UnsupportedoperationException(); } 85 86 V public int count(String employeeId) 87 { 88 throw new UnsupportedOperationException(); 89 } 90

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!