Question: Create a class Employee that has 5 fields: name ( a String ) ; hospital, referring to the Hospital the employee works in; hourlyPay (
Create a class Employee that has fields: name a String; hospital, referring to the Hospital the employee works in; hourlyPay a double; hoursWorkedPerWeek a double; and employeeID an int Each employee ID should be unique across all hospitals, ascending, and start at and automatically generated from the Hospital object by creating a generateEmployeeID method that returns an int in Hospital. Hint: you might want to use static somewhere! All of the fie ds with the exception of employeeID, should be specified in the constructor and have getters and setters. In addition, employeeID should also have a getter method. Override the toString method so that it returns
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
