|
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.
|