Thread: Class help
View Single Post
  #13 (permalink)  
Old 11-14-2007, 07:53 AM
blackstone blackstone is offline
Member
 
Join Date: Nov 2007
Posts: 6
blackstone is on a distinguished road
Not necessarily. I'm not exactly an expert on what is right and what is wrong, but I'm guessing that in some cases it would be perfectly fine and even logical to print errors messages in the class. In your case, however, you need to return a double. If you wanted to print out an error and then return the double as well, that might work.

0 might not work, if the amount being taken out is exactly the same as the amount in the balance.
Reply With Quote