Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Manager extends Employee {
- /***
- * Define Attributes
- ***/
- // Maximum pay rate for a manager
- private static final double MAX_PAY_RATE = 30.00;
- // Set job title for Manager
- private static final String MANAGER_TITLE = "Manager";
- // Constructor for bartender information
- public Manager(String employeeID, String firstName, String lastName, double payRate) {
- super(employeeID, firstName, lastName, payRate);
- this.title = MANAGER_TITLE;
- }
- // Set pay manager pay rate to not exceed base
- @Override
- public void setPayRate() {
- if (payRate > MAX_PAY_RATE) {
- this.payRate = MAX_PAY_RATE;
- } else this.payRate = Math.max(payRate, MIN_PAY_RATE);
- }
- // Set job title for manager
- @Override
- public void setTitle() {
- this.title = MANAGER_TITLE;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment