Question: FLOWCHART PLEASE driver Flowchart 7 This class holds values for hours worked and the hourly pay rate. It calculates the gross pay and adds additional

FLOWCHART PLEASE  FLOWCHART PLEASE driver Flowchart 7 This class holds values for hours
worked and the hourly pay rate. It calculates the gross pay and
driver Flowchart

7 This class holds values for hours worked and the hourly pay rate. It calculates the gross pay and adds additional pay for overtine. public class Payroll private double hoursorked; // Number of hours worked private double payrate; 1/ The hourly pay rate The constructor initializes the hours worked and * payRate fields to e.e. * public Payroll) hours worked - 0.e; payRate - 2.0; ) The setHourshorked method accepts an argument that is stored in the hours worked field. public void setHour shorked(double hours) hourskiorked - hours 7 The setPay ate method accepts an argument which * is stored in the payRate flold. Public void setPay Rate double rate) payRate rate 3 The Retourshoekad method return the hour worked Field poble double hour work it hour The getPayRate method returns the payRate field. 7 public double getPayRate() { return payRate; } /* The getGrossPay method calculates and returns the gross pay. Overtime pay is also included. */ public double getGrossPay() { double grossPay, 7/ Holds the gross pay overtimePay; // Holds pay for overtime 17 Determine whether the employee worked more 7/ than 48 hours. if (hoursWorked > 48) 1/ Calculate regular pay for the first 48 hours. grossPay 40 payRate; 17 Calculate overtime pay at 1.5 times the regular 1/ hourly pay rate. overtimePay (hour's worked 40) (payRate : 1.5); Add the overtime pay to the regular pay. BrossPay ++ overtimePay. else No overtime worked grossPay - pay rate hoursWorked; return krossPay 7 This class holds values for hours worked and the hourly pay rate. It calculates the gross pay and adds additional pay for overtine. public class Payroll private double hoursorked; // Number of hours worked private double payrate; 1/ The hourly pay rate The constructor initializes the hours worked and * payRate fields to e.e. * public Payroll) hours worked - 0.e; payRate - 2.0; ) The setHourshorked method accepts an argument that is stored in the hours worked field. public void setHour shorked(double hours) hourskiorked - hours 7 The setPay ate method accepts an argument which * is stored in the payRate flold. Public void setPay Rate double rate) payRate rate 3 The Retourshoekad method return the hour worked Field poble double hour work it hour The getPayRate method returns the payRate field. 7 public double getPayRate() { return payRate; } /* The getGrossPay method calculates and returns the gross pay. Overtime pay is also included. */ public double getGrossPay() { double grossPay, 7/ Holds the gross pay overtimePay; // Holds pay for overtime 17 Determine whether the employee worked more 7/ than 48 hours. if (hoursWorked > 48) 1/ Calculate regular pay for the first 48 hours. grossPay 40 payRate; 17 Calculate overtime pay at 1.5 times the regular 1/ hourly pay rate. overtimePay (hour's worked 40) (payRate : 1.5); Add the overtime pay to the regular pay. BrossPay ++ overtimePay. else No overtime worked grossPay - pay rate hoursWorked; return krossPay

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!