Thread: Class help
View Single Post
  #14 (permalink)  
Old 11-14-2007, 08:13 AM
Shaolin Shaolin is offline
Member
 
Join Date: Nov 2007
Posts: 36
Shaolin is on a distinguished road
No problem. Ok Im trying to do something else. From my function "takeMoneyOut" I want it to call another boolean function which will check if the dollars being taken out is over the accountbalance limit and thus return a true or false. But I dont know how I can do this. See code:

Code:
public double takeMoneyOut( double amount ) { double totalBalance; totalBalance = balance + overdraftLimit ; if( CheckWithdrawal(amount) == false ) { // error message } else { // return totalBalance } } public boolean CheckWithdrawal(boolean checkWithdraw) { if(checkWithdraw > balance ) { return true; } else { return false; } }
This code doesnt work though.
Reply With Quote