Assignment Description This assignment focuses on programming basics; expressions, variables, constants, static methods and loops. Don runs a restaurant in the inner suburbs of Melbourne. It serves...



Assignment Description



This assignment focuses on programming basics; expressions, variables, constants, static methods and loops.



Don runs a restaurant in the inner suburbs of Melbourne. It serves both western style and Asian traditional dishes in a rustic and chic space with exposed brick and hanging spherical lamps.



Due to the growing number of patrons, the restaurant has decided to take on extra casual employees but this implies more work for Don Jnr to manage the employee records. It is against this background that Don has decided to develop an employee record management system. Details of each employee to be maintained in the system will include; employee id, name, sex (M or F), date of birth, phone number, number of hours worked, hourly rate, gross pay, net pay, and income tax payable.



The gross pay is calculated as the number of hours worked multiplied by pay per hour while net pay is calculated as the difference between gross pay and income tax payable of which income tax payable is calculated by multiplying gross pay by an income tax rate of 15%.



For example, an employee who has worked a total of 30 hours with an hourly rate of $18 will have; gross pay=30*18=540



income tax payable=15%*540=81



net pay=540-81=459





Task Requirements



Imagine you have been invited to develop this system, familiarise yourself with the problem description and complete the following tasks.

















1.



Identify all the variables and their respective data types.



[2 marks]



2.



Identify all the set and get methods for each of the variables identified in 1



[2 marks]





3. Develop a UML class diagram based on the information in 1 and 2. The name of the class should be of the form
MITnnnnnEmployee
where
MITnnnnn
is your MIT ID.




[11 marks]






4. Write a Java implementation of the UML diagram defined in 3. In your program:



a. Include comments describing the function of the program, the name of the programmer



and the date of implementation. [2 marks]











b. Declare all variables as class variables [5 marks]



c. Declare all the static set and get methods for each of the variables declared in (a)



[6 marks]




d. Include static methods to calculate the gross pay, income tax payable and the net pay [12 marks]




e. Once you have calculated the gross pay, income tax payable and net pay. Your program should be able to produce an output as an employee’s pay slip like the example below.
































[10 marks]












Dec 25, 2019BN108
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here