Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Money calculatePay(Employee e) throws InvalidEmployeeType {
- switch (e.type) {
- case COMMISSIONED:
- return calculateCommissionedPay(e);
- case HOURLY:
- return calculateHourlyPay(e);
- case SALARIED:
- return calculateSalariedPay(e);
- default:
- throw new InvalidEmployeeType(e.type);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement