Advertisement
Guest User

Untitled

a guest
Sep 18th, 2014
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.71 KB | None | 0 0
  1. public void increasePayRate() //(Works) Allows the user to click and increase pay w/out inputting values
  2. {
  3.     payRate = payRate + payRateIncrement;
  4.     // all statements here are within themethod block, not the if block
  5.     // so thesestatements here execute ALWAYS
  6.      
  7.     if(payRate <= maxPayRate)
  8.     {
  9.         // these statements here executewhen the payrate is within limits
  10.         // at least when you set up the condition right! :)
  11.         ;
  12.     }
  13.     else
  14.     {
  15.         // these statements here will execute when the payrate was not within limits, so we display an error
  16.         System.out.println("error message: " + "Can't be more then the max pay rate value " + maxPayRate);
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement