Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void increasePayRate() //(Works) Allows the user to click and increase pay w/out inputting values
- {
- payRate = payRate + payRateIncrement;
- // all statements here are within themethod block, not the if block
- // so thesestatements here execute ALWAYS
- if(payRate <= maxPayRate)
- {
- // these statements here executewhen the payrate is within limits
- // at least when you set up the condition right! :)
- ;
- }
- else
- {
- // these statements here will execute when the payrate was not within limits, so we display an error
- System.out.println("error message: " + "Can't be more then the max pay rate value " + maxPayRate);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement