Question: The screenshot below is from a JAVA project, and I need assistance with the part I have highlighted in blue. I am particularly confused about

The screenshot below is from a JAVA project, and I need assistance with the part I have highlighted in blue. I am particularly confused about adding the manager to the employeeDatabase hashmap.Thank you!

The screenshot below is from a JAVA project, and I need assistance

private HashMap employeeDatabase = new HashMap(); public HashMap getEmployeeDatabase() return emp loyeeDatabase; *Creates a new Employee object with the name and salary initialized to the values passed in through the parameter. Adds the Employee to the employeeDatabase HashMap public void addEmployee(String name, double s) Employee e new Employee(name, s); employeeDatabase.put(e.getIdO, e); Complete the addManager method that accepts values for the Manager's name * salary, branchLocation, and numSubordinates as parameters Cin that order). *This method should create a new Manager object, initialize name, salary, *brancLocation, and numSubordinates to the values passed in through the *parameters. The initialized Manager object should then be added to the *employeeDatabase HashMap. *Note: the id is already being set to the current employeeCount in the Employee constructor it public void addManager(String name, double s, String loc, int numSub) /YOUR CODE HERE

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!