Home Tutorialhelp Comment i need help as soon as possible!!!!!!!!! please

 
 

Comment

kj
i need help as soon as possible!!!!!!!!! please,
February 17, 2009 at 1:19 PM

i am new in java and i am writing a program in java that calculates employees payments but i get illigal start in line 3 here is my program :




class WeeklyPay {
public static void main(String[] arguments) {

public static void pay(double basepay, int hours){
if (basepay < 5.00)
{
System.out.println("error");
} else {
if (hours > 60){

System.out.println("error");
} else {
int overtime = 0;
if ( hours > 40) {

overtime = hours - 40;
}
double pay = basepay * hours;
overtimepay = overtime * basepay * 1.5 ;

totalpay + = ( pay + overtimepay ) ;
System.out.println( " the employee is paid " + totalpay );
}
}
}
pay( 7.50 , 35 );
pay( 8.20 , 47 );
pay( 10.00, 73 );

}
}
View All Comments | View Tutorial
Related Tutorial and Articles

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.