a guest Feb 24th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- package computepay;
- * @author Stropheum
- public class ComputePay
- Compute pay (including overtime) for worker. Hours in excess of 40 hours
- are paid at time-and-a-half.
- @param wage the hourly wage for the employee
- @param hoursWorked the number of hours worked by employee in one week
- @return the amount of pay employee earned
- public static double payForWeek(double wage, double hoursWorked)
- double totalPay = 0.0;
- if (hoursWorked <= 40);
- totalPay = hoursWorked*wage;
- totalPay = (40*wage+(wage*(hoursWorked-40));
- return totalPay;
RAW Paste Data