Skip to content

Instantly share code, notes, and snippets.

@jwdunne
Created June 28, 2011 20:05
Show Gist options
  • Save jwdunne/1052049 to your computer and use it in GitHub Desktop.
Save jwdunne/1052049 to your computer and use it in GitHub Desktop.
isWithdrawable method
/**
* Determines if the given amount is withdrawable which is defined as:
* amount must be more than or equal to zero.
* amount must be less than or equal to balance
* @author James W. Dunne
*/
public boolean isWithdrawable(double amount) {
if (amount < 0 || amount > balance) {
return false
}
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment