2-17 Wages

posted Jan 21, 2014, 8:02 AM by Dlovan ismail   [ updated Jan 21, 2014, 8:02 AM by Karwan Jacksi ]
// This program calculates hourly wages plus overtime.

package wages;

public class Wages {

    public static void main(String[] args) {
        
        double regularWages;              //The calculated regular wages.
        double basePay = 25;                //The base pay rate.
        double regularHours = 40;       //The hours worked less overtime.
        double overtimeWages;          //Overtime wages
        double overtimePay = 37.5;    //Overtime pay rate
        double overtimeHours = 10;   //Overtime hours worked
        double totalWages;                   //Total wages
        
        
        regularWages = basePay * regularHours;
        overtimeWages =overtimePay * overtimeHours;
        totalWages = regularWages + overtimeWages;
        System.out.println("Wages for this week are $"+totalWages);
      
    }
    
}

ċ
Wages.java
(1k)
Karwan Jacksi,
Jan 21, 2014, 8:02 AM
Comments