previous | start | next

Self Check

  1. How should you modify the deposit method to ensure that the balance is never negative?
  2. Suppose you construct a new bank account object with a zero balance and then call withdraw(10). What is the value of balance afterwards?

previous | start | next