Skip to content

Conversation

@cecomfort
Copy link

Bank Account

Congratulations! You're submitting your assignment.

Comprehension Questions

Question Answer
Why is it useful to put classes inside modules? What do you think? Modules allow namespacing in order to avoid naming conflicts. I think it's beneficial, so that if I want to create a different account class in the future for another project, I will not have to deal with any naming collisions.
What is accomplished with raise ArgumentError? What do you think it's doing? By raising an argument error, we are able to tell the user that they entered a parameter into our method that does not make sense in the current context by printing a message to the console. It also allows us to define/control what parameters are allowed as inputs in our methods.
Why do you think we made the .all & .find methods class methods? Why not instance methods? We made .all & .find class methods because they are the same for every instance of class Account, rather than a specific instance of the class. They relate to all the Accounts that are made using the csv file, not a single account in itself. For instance, the method '.find' would not be able to return a specific account based on ID if it was an instance method, as it would not have access to the other accounts.
Why does it make sense to use inheritance for the different types of accounts? It made sense to use inheritance, since we wanted our subclasses, the savings and checking accounts, to borrow states and behaviors from the base class, Account.
Did the presence of automated tests change the way you thought about the problem? How? Yes, it made it more difficult for me to approach the problem, in that i had to do a lot more planning upfront before I could actually code my methods. But as I gain more practice with testing, it should be more efficient and will allow me to more easily make changes to my code in the future.

@PilgrimMemoirs
Copy link

Bank Account

What We're Looking For

Feature Feedback
Wave 1
All provided tests pass Well Done
Using the appropriate attr_ for instance variables Well Done
Wave 2
All stubbed tests are implemented fully and pass Well Done
Created instances (by calling new) in Account.all Well Done
Used CSV library only in Account.all (not in Account.find) Well done
Used Account.all to get account list in Account.find Well done
Wave 3
All stubbed tests are implemented fully and pass Well Done
Used inheritance in the initialize for both Checking and Savings Accounts (min balance) Well done
Used inheritance for the withdraw in checking and savings accounts Not using inheritance - how could you utilize the parent class' withdraw method in the child classes, instead of rewriting it.
Baseline
Used Git Regularly Should be committing more often. Good practice is with each new thing added, changed or removed. Then, your commit message should be specific as to what that one thing was that was changed, added or removed.
Answer comprehension questions Well Done
Extras Exceptional tests! Overall, on track and demonstrates understanding of material. Just focus on utilizing inheritance as much as possible :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants