Class
Good class for biginner
import java.util.*; public class WeeklyWages { { double wages, rate, hours; hours = console.nextDouble(); rate = console.nextDouble(); if (hours > 40.0) wages = 40.0 * rate + 1.5 * rate * (hours - 40.0); else wages = hours * rate; wages); } }
Enter the working hours:40 Enter the pay rate:12 The wages are $480.00
Enter the working hours:45 Enter the pay rate:100 The wages are $4750.00
if (hours > 40.0) wages = 40.0 * rate + 1.5 * rate * (hours - 40.0);
wages = hours * rate;