Stack List for Payroll records a) Add a Java Project StackPayRollProject to assign the instance data of
Question:
Stack List for Payroll records
a) Add a Java Project StackPayRollProject to assign the instance data of all records read from the input file PayRoll.in into a stack List to print records in the descending order with respect to the amount of employee Net Amount Pay using the method CalculateNetAmountPay (). You should use user-defined method push() implemented in the class.
b) Add a class to define data structure type, called Payroll, which is designed to group data and functions into a single unit that represents a template of the fields used in PayRoll.in as shown in the following Figure.
c) Each line within PayRoll.in represents a payroll's record stored in salary net amount ascending order with the following fields: employee_id (int), employee_name (string), employee_ssn (string), employee_work_hours (double), employee_hour_rate (double).
d) Add default constructor (employee_id=0, employee_name="", employee_ssn="", employee_work_hours=0, employee_hour_rate=0) and constructor with parameters within Payroll class in order to initialize the data members (employee_id, employee_name, employee_ssn, employee_work_hours, employee_hour_rate) of every object.
e) Add a method within PayRoll class called (CalculateNetAmountPay()) that calculates and returns the salary net amount taking into account the different deduction amounts described below.
1) Total_Income = employee_work_hours * employee_hour_rate
2) Deductions:
Provincial tax (Prv_Tax): 9% of Total_income.
Federal tax (Fed_Tax): 7% of Total_income.
Que. parental insurance. plan (QP_Ins): 0.55% of Total_income.
Employment insurance (E_ins): 1.4% of Total_income.
(Quebec pension plan) Qpp : 4.5% of Total_income.
Union dues (Union_d): 1.65% of Total_income.
3) The total Net Amount (Net_Amount) is calculated according to the following formula: Net_Amount = Total_Income - Deductions
Auditing and Assurance Services
ISBN: 978-0077862343
6th edition
Authors: Timothy Louwers, Robert Ramsay, David Sinason, Jerry Straws