Advertisement
pellekrogholt

Untitled

May 8th, 2012
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. /*@ requires amt > 0 && amt <= bal;
  2. @ assignable bal;
  3. @ ensures bal == \old(bal) - amt; @*/
  4. public void withdraw(int amt) {
  5. if (amt > bal && amt <= bal){
  6. bal -= amt;
  7. } else {
  8. //raise what ?
  9. }
  10.  
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement