Thread: Class help
View Single Post
  #15 (permalink)  
Old 11-14-2007, 04:10 PM
JT4NK3D's Avatar
JT4NK3D JT4NK3D is offline
Member
 
Join Date: Nov 2007
Posts: 50
JT4NK3D is on a distinguished road
try this
Code:
i think it will work after changing these things: public double takeMoneyOut( double amount ) { double totalBalance; totalBalance = balance + overdraftLimit ; if( CheckWithdrawal(amount) == false ) { System.err.println("You tried to withdraw more than you have."); } else { return totalBalance } } public boolean CheckWithdrawal(boolean checkWithdraw) { if(checkWithdraw > balance ) { return true; } else { return false; } }
if that doesn't work at the if statement instead of if checkwithdrawal(amount) == false try making a boolean variable and assigning yourObject.CheckWithdrawal(amount); then doing if ( yourbool == false ) code.
btw u could do the error with system.out, err just means its an error

Last edited by JT4NK3D : 11-14-2007 at 04:12 PM. Reason: fergot stuff
Reply With Quote