Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

JAVA PROGRAM

Assignment Description

This assignment focuses on programming basics; expressions, variables, constants, the use of loops and if-statements. 

LogicFoo Limited needs a program to calculate how much to pay their casual employees who are paid on an hourly basis. The Australian Department of Employment stipulates that employees should be paid time and a half for any hours over 40 that they work in a single week. In addition, LogicFoo is required to deduct income tax from each employee at a fixed Income Tax Rate set at 15%. For example, if an employee works 45 hours, they get 5 hours of overtime, at 1.5 times their base pay. The department requires that hourly employees be paid at least $18.00 an hour. LogicFoo Limited requires that an employee not work more than 60 hours in a week.

An employee gets paid (hours worked) × (base pay), for each hour up to 40 hours. For every hour over 40, they get overtime = (base pay) × 1.5. The base pay must not be less than the minimum wage ($18.00 an hour), if it is, the program should print an error. And if the number of hours is greater than 60, the program should also print an error message.

Task Requirements

·         Create a new class called MITnnnnnLogicFoo were MITnnnnn is your MIT student ID.

·         Include documentation before the start of the class to include your name, ID and a description of the program

·         Include a main method

·         Inside the main method declare and initialise the variables; base pay and hours worked.

·         Other variables should include gross pay, overtime, net pay and pay you as gain.

·         Include if statements that check for base pay and the limit of 60 hours in a week and prints to the console the respective error messages.

·         Include statements to calculate overtime, gross pay, pay as you go and net pay

·        

Include statements that print to the console a payslip for an employee using the example shown below.

Hint

Do not try to write the entire program in one go. It is much easier to write a small piece and test it, then write another small piece and test it. For example, start by writing just a skeleton of your method and your main program. Then add the code to do the normal salary computation, without any special rules. Then add each additional rule, one at a time. You should test your program with simple test inputs to check that you handle each case.

Marking criteria:

Marking criteria is shown in following table. Marks are allocated as follows:

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question