Open
Conversation
…draw method that passed first test
…sts, wave 3 complete
CheezItMan
reviewed
Feb 28, 2017
CheezItMan
left a comment
There was a problem hiding this comment.
Nice work overall. Just a few comments in the code here.
| return @all_accounts if @all_accounts | ||
| @all_accounts = [] | ||
| CSV.open("/Users/brenna/ada/week3/BankAccounts/support/accounts.csv").each do | line | | ||
| @all_accounts << Bank::Account.new(line[0].to_i, line[1].to_f, line[2]) |
There was a problem hiding this comment.
You can get this to work with: support/accounts.csv instead, that way it will work if you move the project to another folder.
| return @all_owners if @all_owners | ||
| @all_owners = [] | ||
| CSV.open("/Users/brenna/ada/week3/BankAccounts/support/account_owners.csv").each do | line | | ||
| owner_hash = { |
There was a problem hiding this comment.
Similar to the above, you can use support/account_owners.csv.
| @@ -0,0 +1,30 @@ | |||
|
|
|||
There was a problem hiding this comment.
The file should probably be named savings_account.rb instead, but not a big deal.
| @check_count = 0 | ||
| end | ||
|
|
||
| def withdraw(withdrawal_amount) |
There was a problem hiding this comment.
Could you use super in this method?
| print "There must always be at least $10 in your savings." | ||
| return @balance | ||
| end | ||
| super |
Bank AccountWhat We're Looking For
SummaryNicely done overall. Some of your methods most notably, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bank Account
Congratulations! You're submitting your assignment.
Comprehension Questions
raise ArgumentError? What do you think it's doing?.all&.findmethods class methods? Why not instance methods?