Banking on Ruby

Well Done!

Excellent work! You've got your very own Account class and checking_account instance, complete with public and private methods.

Go ahead and try to get to your pin from outside the class. Not easy, is it?

How could you improve this class? You might:

  • Include a deposit method that lets users add money to their accounts
  • Include error checking that prevents users from overdrawing their accounts
  • Create CheckingAccounts or SavingsAccounts that inherit from Account

Feel free to add to your code until you've got it working just as you want it. Then click Run to complete this project!

Community Forums
Get help and ask questions in the Codecademy Forums
Report a Bug
If you see a bug or any other issue with this page, please report it here.