2)- Steven find a summer job on retail store this summer, his manager remind him that he has to work 40 to 50 hours per week

Steps that need to be followed

Help: public class module2_2 public static void main (String [] args) Step 1: you need the following double variables to calc

2)- Steven find a summer job on retail store this summer, his manager remind him that he has to work 40 to 50 hours per week for three months. He will get $12 dollar per hours and 1.5 more for over time. Write a program to find out his overtime income and May income and print to output. Here are total hours he worked for May, June, and Juley May 170 hours June 160 Juley 165 Help: public class module2_2 public static void main (String [] args) Step 1: you need the following double variables to calculate the monthly and overtime income double overtimehHours-0; double Monthlylncome= 0; double totalHoursPerMonth =1 70; double totalpayOn May 0 Step 2: You should find out for month of May Steven working overtime or not? If the total Hours per Month greater than 160 then that is the overtime: 170-160, 10 hours overtime iftotalHoursPerMonth>160) overtimeHours= totalHoursPerMonth-160; // so overtime is 10 hours ifnot over time is O. else overtimeHours=0; Step3: if there is overtime calculate the monthly income by this formula Regular pay: 160*12+ overtime pay: overtimeHours (1.5*12) equal $180 totalpayOnMay 160*12+ overtimeHours (1.5*12) elsc totalpayOnMay-160*12; Step4: print to output totalpayOnMay System.out.println(“totalpayonMay: “+totalpayonMay+ overtime hours is =”tovertime Hours);



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *