Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Detailed Specification This project is to be done as an individual assignment. A

ID: 3660911 • Letter: D

Question

Detailed Specification This project is to be done as an individual assignment. ABC Manufacturing Ltd is a newly established manufacturing company that has a medium size work force. ABC Manufacturing staff is divided into three (3) major groups, that is, hourly paid workers, commission type workers and monthly fixed paid workers. The financial controller of the company was bombarded with complaints by staff with respect to payment delivery. Employees claimed that salaries were not being issued on time and this was mainly due to the manual system used to calculate their salary. To alleviate the problem, the financial controller demanded that a payroll program be implemented to generate salaries for ALL employees within the company. You have been contracted as a programmer by ABC Manufacturing Ltd to write a payroll program that will generate all employees salary. The program must calculate ALL employees gross pay, deductions and net pay. The financial controller specified the following features and business rules are implemented in the program to ensure that each employee salary is calculated correctly:- ? Input & Gross Pay Calculation General Guidelines for ALL Workers ? The program should prompt the user for ALL employees employee number, first name, and surname and employee type code. ? An employee Type code can be C or c for Commission Worker, H or h for Hourly Worker or F or f for Monthly Fixed Paid Worker. Monthly Fixed Paid Workers ? If F or f was entered as the employee Type code then it implies that the user is a monthly fixed paid worker and the user should also be prompted for the employee fixed salary as well as the above data. Commission Workers ? If C or c was entered as the employee Type code then it implies that the user is a commission paid worker and the user should also be prompted for the employees fixed salary and the total sales earn for the month as well as the above information. ? ALL Commission Workers are given a 5% commission incentive on total sales. ? Commission Workers gross pay is calculated by adding their fixed salary to the 5% commission incentive rate by their total sales. Hourly Paid Worker Page 3 of 3 ? If H or h was entered as the employee Type code then it implies that the user is a hourly paid worker and the user should also be prompted for the employee rate of pay and hours worked for the month. ? Hourly Paid Workers gross pay is calculated by multiplying their rate of pay by hours work per month. ? All hourly paid employees are to be paid time-and-a-half for all hours worked over 120 hours for the month. ? Deductions Calculation o ALL employees are allowed a personal tax-free allowance of $1000. The balance is taxed at 15%. ? Net pay Calculation & Output & Report ? The net pay for all employees is calculated by applying the appropriate calculations. ? After all the information is captured from the user and the relevant calculations are performed the program should generate the following reports:- :- o A payroll displaying the output of ALL employees: employee number, name, employee type, gross salary, deductions and net pay. o Display the total number of processed employees. o Display the number of commission workers, hourly paid workers and monthly fixed paid workers that were processed. o A cumulative figure tallying the total gross pay, deductions and net pay of all employees. o The name and the value of the employee who earn the highest and lowest net salary. ? PROGRAMMING GUIDELINES ? You must create 3 methods called calGrossF(),calGrossH() and calGrossC() that accepts appropriate arguments and calculate the gross salary for a Monthly Fixed Paid, Hourly Paid and Commission Paid worker respectively. ? You must also create a method called calDeductions() and calNetpay() that accepts appropriate arguments and calculate the deductions and net pay respectively. ? You must create arrays that will store all employees employee number, name, employee type, gross pay, deductions and net pay. Save the program as firstname_ABCPayRoll.java

Explanation / Answer

import com.sun.java_cup.internal.runtime.Scanner; import java.util.*; public class Employee { // define your parameters private int hoursWeft = 40; private int hoursWdft = 8; private int hoursWpt = 20; private double salary = 0; private double ETF= 0.12; private java.util.Scanner s; enum PayrollDay{ MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY; // constractor that calls the method that works public Employee() { makeEmployee(); } // end constructor private void makeEmployee() { // define your input s = new java.util.Scanner(System.in); int inputType = 0; double salaryMoney = 0; System.out.print("Please enter the employee type:"); System.out.println("part-time:press 1 , full-time: press 2..."); //declare keyboard as scanner type Scanner keyboard = new Scanner(System.in); //get input from the user System.out.print("Please enter a number of hours the employee worked during the weekdays: "); //declare the hours worked in weekdays int hrsWeekdays = keyboard.nextInt(); System.out.print("Please enter a number of hours the employee worked during the weekend: "); //declare the hours worked during the weekends int hrsWeekend = keyboard.nextInt(); // always work while (true) { // catches if the input is not int try { inputType = Integer.parseInt(s.next()); }//end try catch (Exception e) { inputType = 3; }// end catch if (inputType == 1 || inputType == 2) { break; } // end if System.out.print("Please enter the employee type again (only 1 or 2):"); System.out.println("part-time:press 1 , full-time: press 2..."); }// end while //enum PayrollDay{ //MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY; double undertimeft; double undertimept; double overtimeft; double overtimept; double gosswage; if(inputType == 1) { // hrsWorked(); // double payFt(int hrsWeekdays,int hrsWeekend); switch(this){ case SATURDAY: case SUNDAY: salary = 100 * hoursWeft; if(hrsWeekend > hoursWeft){ int hoursWork = hrsWeekend - hoursWeft; overtimeft = 130 * hoursWork; gosswage = salary + overtimeft; }//end else if else { undertimeft = 2.5 * hrsWeekend; gosswage = salary + undertimeft; } //end else default: //weekdays salary = 100 * hoursWdft; if(hrsWeekdays > hoursWdft){ int hoursWorkw = hrsWeekdays - hoursWdft; overtimeft = 140 * hoursWorkw; gosswage = salary + overtimeft; }//end else if else { undertimeft = 12.5 * hrsWeekdays; gosswage = salary + undertimeft; } //end else break; }//end switch //return salary; salaryMoney = gosswage - (gosswage * ETF); System.out.println("The salary with reduced ETF: "+salaryMoney); } // end if else { // hrsWorked(); //double payPt(int hrsWeekdays,int hrsWeekend); switch(this){ case SATURDAY: case SUNDAY: salary = 250 * hoursWpt; if(hrsWeekend > hoursWpt){ int hoursWorked = hrsWeekend - hoursWpt; overtimept = 275 * hoursWorked; gosswage = overtimept + salary; }//end else if else { undertimept = 12.5 * hrsWeekend; gosswage = undertimept + salary; } //end else default: //weekdays salary = 250 * hoursWpt; if(hrsWeekdays > hoursWpt){ int hoursWorkedw = hrsWeekdays - hoursWdft; overtimept = 275 * hoursWorkedw; gosswage = overtimept + salary; }//end else if else { undertimept = 12.5 * hrsWeekdays; gosswage = undertimept + salary; } //end else break; }//end switch }//end enum System.out.println("the gosswage is: " + gosswage); salaryMoney = gosswage - (gosswage * ETF); System.out.println("The salary with reduced ETF: "+salaryMoney); }// end else }//end makeEmployee public static void main(String[] args) { Employee emp = new Employee(); }//end main }//end employee

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote