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

The payroll department in your organisation has overthe years depended on manual

ID: 3617704 • Letter: T

Question

The payroll department in your organisation has overthe years depended on manual   way of calculating theemployee’s salary. The head of that department requires youto create a simple system to ease up their work. Create the simplesystem by doing the following: Please use the below code:
 class payday {public static void main (String[] args) {double hours = Double.valueOf(args[0]).doubleValue();double rate = Double.valueOf(args[1]).doubleValue();double pay;if (hours > 40) {pay = rate * 40 + 1.5 * rate * (hours - 40);}else {pay = rate * hours;}System.out.println("The paycheck is " + pay + " dollars.");if ( rate < 4.35) {System.err.println("This employee is not getting the legally required minimum wage.");}if ( hours > 7*24) {System.err.println("Did this employee really work " + hours + " hours?");}}}
( i )Modify the above program to meet the Ministry ofLabor's requirement that is, include Gross pay, Personal relief,PAYE, NSSF, NHIF and other deductions such as loans, and give totaldeductions and the Net salary. ( Hint: Use Dialogboxes) Note PAYE-Pay As You Earn is about 30% of Basic salary,NSSF-National Social Security Fund is about$320,NHIF-National Hospital Insurance Fund about $270.Assume TotalDeductions include Loans,Salary Advance,Fuel Invoices. Netsalary will be a Gross pay minus all Deductions  Please sample a pay slip below for formulars and conditions. Use Gross Pay Ksh 100,00 Deductions PAYE-Ksh 30,000 NSSF-Ksh 320 NHIF-Ksh 270 Total Loans-Ksh 25,000 Net Pay = Ksh 44,410 The payroll department in your organisation has overthe years depended on manual   way of calculating theemployee’s salary. The head of that department requires youto create a simple system to ease up their work. Create the simplesystem by doing the following: Please use the below code:
 class payday {public static void main (String[] args) {double hours = Double.valueOf(args[0]).doubleValue();double rate = Double.valueOf(args[1]).doubleValue();double pay;if (hours > 40) {pay = rate * 40 + 1.5 * rate * (hours - 40);}else {pay = rate * hours;}System.out.println("The paycheck is " + pay + " dollars.");if ( rate < 4.35) {System.err.println("This employee is not getting the legally required minimum wage.");}if ( hours > 7*24) {System.err.println("Did this employee really work " + hours + " hours?");}}}
 class payday {public static void main (String[] args) {double hours = Double.valueOf(args[0]).doubleValue();double rate = Double.valueOf(args[1]).doubleValue();double pay;if (hours > 40) {pay = rate * 40 + 1.5 * rate * (hours - 40);}else {pay = rate * hours;}System.out.println("The paycheck is " + pay + " dollars.");if ( rate < 4.35) {System.err.println("This employee is not getting the legally required minimum wage.");}if ( hours > 7*24) {System.err.println("Did this employee really work " + hours + " hours?");}}}
( i )Modify the above program to meet the Ministry ofLabor's requirement that is, include Gross pay, Personal relief,PAYE, NSSF, NHIF and other deductions such as loans, and give totaldeductions and the Net salary. ( Hint: Use Dialogboxes) Note PAYE-Pay As You Earn is about 30% of Basic salary,NSSF-National Social Security Fund is about$320,NHIF-National Hospital Insurance Fund about $270.Assume TotalDeductions include Loans,Salary Advance,Fuel Invoices. Netsalary will be a Gross pay minus all Deductions  Please sample a pay slip below for formulars and conditions. Use Gross Pay Ksh 100,00 Deductions PAYE-Ksh 30,000 NSSF-Ksh 320 NHIF-Ksh 270 Total Loans-Ksh 25,000 Net Pay = Ksh 44,410

Explanation / Answer

please rate - thanks your question, as far as changes, is not clear. this should get you started--note the commented out code import javax.swing.*; import java.util.*; public class untitled { public static void main (String[] args) { double paye,nssf=320,nhif=270,loans; double hours; double rate; double pay; String mess; /*mess=JOptionPane.showInputDialog("Enter hours worked"); hours=Double.parseDouble(mess); mess=JOptionPane.showInputDialog("Enter pay rate"); rate=Double.parseDouble(mess); */ mess=JOptionPane.showInputDialog("Enter gross pay"); pay=Double.parseDouble(mess); mess=JOptionPane.showInputDialog("Enter any loans"); loans=Integer.parseInt(mess); /*if (hours > 40) { pay = rate * 40 + 1.5 * rate * (hours - 40); } else { pay = rate * hours; } */ paye=.3*pay; pay=pay-paye-nssf-nhif-loans; mess="The paycheck is " + pay + " dollars."; JOptionPane.showMessageDialog(null,mess,"amount",JOptionPane.INFORMATION_MESSAGE); /*if ( rate < 4.35) { mess="This employee is not getting the legally required minimumwage."; JOptionPane.showMessageDialog(null,mess,"amount",JOptionPane.WARNING_MESSAGE); } if ( hours > 7*24) { mess="Did this employee really work " + hours + " hours?"; JOptionPane.showMessageDialog(null,mess,"amount",JOptionPane.ERROR_MESSAGE);} */ } }
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