Skip to Content
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!

Folder Icon

Take this course for free

Already have an account?