Assignment title: Information
The assignment task consists of implementing a tool which would assist the manager of a small company in scheduling employees. The details of the company's operations are as follows: • It operates on 5 days of the week (not on the weekends). On each day the company runs four shifts, and a single employee is required for each shift. • The company employs both permanent employees and casual employees. • Permanent employees are allocated to the same shift for all 5 days of a week, and are paid a fixed weekly wage. • Casual employees can be allocated to any number of shifts per week (including zero), and are paid a fixed amount per shift worked. The Employee Class The first stage in this assignment is to define a Java class for an Employee based on the UML diagram on the next page. The methods of Employee should perform as follows: - The constructor simply initialises the instance variables to the values provided as parameters, and sets shiftsWorkedThisWeek to 0 - The accessor methods (gets) simply return the value of their corresponding variable - There are no set methods – it is assumed that the employee's name and ID will not change - resetShiftsWorkedThisWeek() sets shiftsWorkedThisWeek to 0 - incrementShiftsWorkedThisWeek () adds one on to the current value of shiftsWorkedThisWeek - calculateWeeklyPay() is provided so that it can be over-ridden by the subclasses – this method can be declared as abstract - the toString method returns a String describing the Employee o this should be formatted as their employee ID in square brackets, followed by their last name in all upper-case, a comma, and their first-name in mixed-case o for example, if we have instantiated an Employee as follows Employee e = new Employee("Joe","Bloggs","BLO12345678"); then calling e.toString should return the String "[BLO12345678] BLOGGS, Joe" You should also write a small driver class called TestEmployee, and thoroughly test the Employee class before proceeding further