-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWages.java
More file actions
23 lines (19 loc) · 767 Bytes
/
Wages.java
File metadata and controls
23 lines (19 loc) · 767 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//Wages.java
//This program calculates hourly wages plus overtime.
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);
}
}