This week's book giveaway is in the Testing forum.We're giving away four copies of The Way of the Web Tester: A Beginner's Guide to Automating Tests and have Jonathan Rasmusson on-line!See this thread for details.
Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!

# I am a true green horn

Joe Wekenman
Greenhorn
Posts: 1
I just don't get this Java Programming. The teacher I have just lectors and never puts us On the Computers. I have to program a payroll program that figures out over time and hourly rate is over 5.15. Then a second part that tells how many payroll clcs have been figured, total hours and total over time. So parts really through me any hints
Here is what I have so far. I am getting 300 code errors
package payroll;
/**
* Title: Payroll
* Description: Make out payroll check and then figure out stats.
* Company:
* @author Joe Wekenman
* @version 1.0
*/
public class App {
public static void main(String[] Args) {
// Variables
int hours;
int dollars;
int over;
int payroll;
int thours;
// Prompt for read
System.out.println("Enter Hours: ");
System.out.println("Enter Pay: ");
if (dollars < 5.15)
System.out.println("Enter Hours: ");
System.out.println("Enter Pay: ");
if (dollars < 5.15)
else
// Calculate
if (hours > 40) {
hours - 40 = over;
over * .5 = over;
hours + over = thours;
thours * dollars =payroll;
System.out.printin ("Payroll" (payroll));
}
if-else (hours <= 40)
hours * dollars = payroll;
System.out.printin ("Payroll" (payroll));
}
}
}

Greenhorn
Posts: 11
Hi friend I am also a green horn.I just saw your code.I am very sorry to say this, but U badly need a good teacher or a good book.You made very basic mistakes.The first mistake is you did not use any braces{} to start and end the conditional statement like "if". And there is no statement like if-else its just "if else".
In this line of code," System.out.printin ("Payroll" (payroll)); " there is no printin in JAVA. we should write this line as "System.out.println ("Payroll" + payroll); " We should print the variables using a + operator.
And while assigning a variable, you should not write like this" hours + over = thours;" the expression is to written on the right and the variable on left " thours = hours + over ;".
I dont know about Keyboard.readInt(). I think we can use System.in to get the input.
Please try to read a book and practice on the system.

Dirk Schreckmann
Sheriff
Posts: 7023
Advice that has always served me well:
Put the program together one very small part at a time. Do not add a new part until every existing part works.

Dirk Schreckmann
Sheriff
Posts: 7023
Otherwise, what's the first error that you are getting? Why do you think that is happening?