-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Queues - Kayla Kubicke - Bank Accounts #36
base: master
Are you sure you want to change the base?
Conversation
Bank AccountWhat We're Looking For
Outside of a couple of parts of Wave 3, this looks solid. Good work! |
describe "Account.all" do | ||
|
||
before do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice use of before
!
require 'csv' | ||
|
||
module Bank | ||
class MoneyMarketAccount < Bank::Account |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this MoneyMarketAccount
- I would have expected to see CheckingAccount
in this file (and that's what you appear to have implemented).
@counter = 0 | ||
end | ||
|
||
def withdraw(amount) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be cleaner to use super
here to call Account#withdraw
, and centralize your logic all in one place. In this case Account#withdraw
would probably require more parameters, like a fee and a minimum balance.
withdrawal_amount = 2.0 | ||
account = Bank::MoneyMarketAccount.new(666, start_balance) | ||
|
||
3.times do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like that you used a times
loop here to DRY up this code. Good work!
Bank Account
Congratulations! You're submitting your assignment.
Comprehension Questions
raise ArgumentError
? What do you think it's doing?.all
&.find
methods class methods? Why not instance methods?