Skip to content

Conversation

@secretsharer
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? Namespace organization seems like a good thing.
What is accomplished with raise ArgumentError? What do you think it's doing? If conditions that would raise the error are satisfied, the program terminates. (Which, assuming proper placement, is what we want.)
Why do you think we made the .all & .find methods class methods? Why not instance methods? So they can be used throughout the parent class and its inheritors.
Why does it make sense to use inheritance for the different types of accounts? We already coded the behavior and it can be shared among the classes that will use it without repeating the code.
Did the presence of automated tests change the way you thought about the problem? How? Absolutely. It more clearly lensed the context for what the code needed to achieve. You think you already know what needs to happen, but the TDD exercises made me think of edge cases and the logic to create them. Better view into creating orig code.

@secretsharer
Copy link
Author

I WOULD REWRITE ALL OF THESE! Since I began this project, I have a much better understanding of classes, inheritance and class methods, especially since Alouette.

@kariabancroft
Copy link

Bank Account

What We're Looking For

Feature Feedback
Wave 1
All provided tests pass Yes
Using the appropriate attr_ for instance variables Yes. A comment about style: you always want your initialize method at the top of the class, no matter what (right now in the Account class there are a few class methods above it).
Wave 2
All stubbed tests are implemented fully and pass Not quite. It seems like you are halfway there a majority of the tests that you've created (using the code in the it block but missing the assertions). You should also leave the tests from Wave 1 uncommented to ensure that the changes you are making for the future wave won't break the code in the previous wave.
Created instances (by calling new) in Account.all Yes
Used CSV library only in Account.all (not in Account.find) Yes
Used Account.all to get account list in Account.find Yes - nice job!
Wave 3
Concerns In the CheckingAccount class, the methods are outside of classes and used class variables which defeats the purpose. These should be inside the class. The SavingsAccount looks better since the methods are inside the class definition.
All stubbed tests are implemented fully and pass Not quite. Looks like you attempted the savings account tests only. Some of the tests for this section are using the Account class rather than the corresponding savings account.
Used inheritance in the initialize for both Checking and Savings Accounts (min balance) Yes - though it does look like some of the min balance logic was duplicated in the SavingsAccount initialize method.
Used inheritance for the withdraw in checking and savings accounts Yes, halfway there. Used a variable for the minimum balance in the SavingsAccount with then was used in the Account's withdraw method implementation.
Baseline
Used Git Regularly Not quite. In your next project it is important to use git even more often and therefore have even more relevant commit messages.
Answer comprehension questions Yes. I really liked your response on the question about writing tests - gave me nice insight into how the tests are working for you now. Seems like there might be some confusion with class methods vs instance methods. Class methods are totally independent of the concept of inheritance. Any class that we've created thus far (like Planet) could implement class methods, not just these classes that are inheriting behavior from one another. (Also, i'm thrilled to see your comment about having a better understanding of these concepts after this weekend's HW)
Overall I think it would be good to review some of the Wave 2 and Wave 3 tests with a tutor individually or in open tutoring. You will certainly get more practice with testing in the next few assignments. Please let me know if/what specific topics you'd like some review or direction on so I can assist!

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