Calculate staff payroll. Create a class named payroll that calculates staff payroll by checking on the hours worked. Use constructor to store value of hours worked and rate. Provide a methods named CalculatePayroll().
Create an extended class named overtime class if hours worked more than 40 hours. Provide a methods named CalculateOT(). For one hour RM 50.
Write an application named staffPayroll that creates an object of each class, demonstrates that all the methods work correctly. Get the user input for hours worked and rate.
The answer to the question is available in the PDF file https://assignmentexpert.com/https://assignmentexpert.com/homework-answers/programming-answer-66361.pdf
Comments
Leave a comment