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