Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Bartender extends Employee {
- /***
- * Define Attributes
- ***/
- // Maximum pay rate for a bartender
- private static final double MAX_PAY_RATE = 18.00;
- // Set job title for bartender
- private static final String BARTENDER_TITLE = "Bartender";
- // Constructor for bartender information
- public Bartender(String employeeID, String firstName, String lastName, double payRate) {
- super(employeeID, firstName, lastName, payRate);
- this.title = BARTENDER_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 bartender
- @Override
- public void setTitle() {
- this.title = BARTENDER_TITLE;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement