Question: For CompanyB.java: 7 . Inspect CompanyB s one attribute: a HashMap ( employeeDatabase ) that maps an Employee s identification number ( the key )
For CompanyB.java: Inspect CompanyBs one attribute: a HashMap employeeDatabase that maps an Employees identification number the key to an Employee object the value Inspect the default Company constructor that initializes the employeeDatabase HashMap. Inspect the accessor method for the employeeDatabase field Try calling the getEmployeeDatabase method and storing what is returned in a HashMap to ensure you are familiar with returning references. Inspect the populateEmployeeDatabase method to see how it works. Tip: Comment above the method with your stepbystep description of what this method does to ensure you understand its entirety. Complete the addEmployee method that accepts a name and salary as its parameters in that order creates a new Employee object with these values and puts the new Employee with its id in the HashMap. method stub provided Test Case : After testing your code, submit to zyBooks to ensure it is functioning before proceeding. Complete the increaseSalary method that accepts an int id as its parameter and increases the Employee with the matching ids salary by method stub provided
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
