Click here to navigate the course.

Drag the edges to resize the window.

In Projects, you can keep track of your progress as you go throught the tasks. Check each item as you complete it!

Learn
Banking on Ruby

Making a Withdrawal

Well done! Now let's add in our second public method, which will allow us to withdraw money from our account.

The trick to this one is to realize that since @balance can only be accessed from inside the class, we'll want to use @balance -= amount to decrease the balance by a certain amount.

Report a Bug
If you see a bug or any other issue with this page, please report it here.
Code Editor