hello.
im still very new to the
java language.
im having a dilemma building a program that is supposed to calculate pay.
employees are supposed to make 5.15 an hour until they work more than 40.
once they work more than 40 they are supposed to make time and a half.
i am also supposed to increment the number of calculations i make for another feature of the program.
and finally, im trying to keep track of the total amount of pay that has been calculated.
any assistance will be greatly appreciated.
i have tried coding this many different ways.
this is what i have come up with as of right now.
if (choice == pay) {
System.out.print("Hours Worked: ");
double hours = Utility.readDouble();
double payroll = (5.15 * hours);
System.out.println("Gross Pay: " + payroll);
if (pay == 0)
break;
{
if (pay > 0);
System.out.println("Invalid Hours Worked.");
continue;
}
Utility.pressEnter();
System.out.println("");
}
//Statistics!!!
else if (choice == stats) {
System.out.print("Payroll Calculations Performed: ");
Utility.pressEnter();
System.out.println("");
}
thank you.