•Some examples of
exceptions that can affect a bank account: These should be handled by program not as exceptions.
–A negative starting balance is passed to the
constructor.
–A negative interest rate is passed to the
constructor.
–A negative number is passed to the deposit method.
–A negative number is passed to the withdraw method.
–The amount passed to the withdraw method exceeds the account’s balance.
•We can create exceptions
that represent each of these error conditions but that would be stupid.