Professional Documents
Culture Documents
Assignment5 Java
Assignment5 Java
isTrue = true;
if (minWage > startingRate)
{
System.out.println("You have to enter an amount greater than"
+ " that of minimum wage ($7.25/hr.) ");
}
}
System.out.println("Your starting pay-per-hour-rate is going to be: $ "
+ dollar.format(startingRate));
//calculate salary
salary = startingRate * hours;
//calculate new hourly rate for number of months given
for (int x=0; x<months; x++)
{
newRate = startingRate + x;
newSalary = newRate * hours;
System.out.println("Your salary for month " + (x+1)
+ " is going to be: $ " + dollar.format(newSalary));
totalSalary += newSalary; //running total of all months
}
//display salary for each month and total for all months
System.out.println("Your total salary earned for " + time.format(months)
+ " months worked is: $ " + dollar.format(totalSalary));
}
//end program
}