> First off, statements have to be inside methods.
> Second, what are you trying to do with 'get.payrate' and similar
> wording ?
> --------------------
> Paul Hamaker, SEMM, teaching ICT since 1987
> http://javalessons.com
porky008 schreef:
> i need it to repeat and make sure the hours and payrate are positive
> numbers. i know it is a simple while loop but no matter where i try to
Move anything having to do with input and validation to you 'main'
method.
Omit or comment out your get methods, for the time being.
Scannerinput : Scanner input.
To indicate fields as opposed to a method parameters, you can use
'this' :
this.payrate , this.hours etc.
> put it or word it i cant get it to go right. i have been rereading the
> book for the last 2 weeks and it is just not clicking
What book is it ? Does it have examples ? Did you get the examples to
run ?
Do you realize that the first stage to a working (let alone correct)
program is getting the syntax right ?
Pay notice to the errors and warnings you're presented by the compiler,
solve them one by one.
--------------------
Paul Hamaker, SEMM, teaching ICT since 1987
http://javalessons.com
porky008 - 25 Oct 2006 21:48 GMT
> porky008 schreef:
> > i need it to repeat and make sure the hours and payrate are positive
[quoted text clipped - 20 lines]
> Paul Hamaker, SEMM, teaching ICT since 1987
> http://javalessons.com
We are using Java: How to Program, Sixth Edition by H.M. Deitel and
P.J. Deitel. ? It has a lot of examples but I have never been able to
get one to work. I am going up to the library today to see if I can
find a better book. Any one have a good recommendation I try to notice
what it says is wrong and look to the web then the book to try to fix
it. Then I turn to here as a last resort. Thanks for all the help on
this I got it figured out thanks to all of you. Now to see if I can
figure out some simple arrays for the next assignment.