Skip to content

Theresa's Bank Account#16

Open
TheresaManney wants to merge 17 commits intoAda-C7:masterfrom
TheresaManney:master
Open

Theresa's Bank Account#16
TheresaManney wants to merge 17 commits intoAda-C7:masterfrom
TheresaManney:master

Conversation

@TheresaManney
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? It is useful to put classes inside modules because the classes can be different instances of a module. The module can have characteristics that can carry out through classes. I think they are also a good way to organize classes to understand how the classes are communicating and relate to one another.
What is accomplished with raise ArgumentError? What do you think it's doing? raise ArgumentError is a response to user input error for when we know exactly what the error will be. So instead of the program breaking and showing a terminal type error message, it will not exit the program. It will output an error message to the user that the code designer made and will sometimes even re-prompt the user too depending on the situation.
Why do you think we made the .all & .find methods class methods? Why not instance methods? We used class methods for .all and .find since they don't deal with specific instances of the class, they are more constant. One that creates an array of all the accounts and one that can find things within the array created in .all.
Why does it make sense to use inheritance for the different types of accounts? This makes sense because different accounts have similar properties to its parent / super class that can then be utilized in their own class and can also be modified based on being a different account type.
Did the presence of automated tests change the way you thought about the problem? How? Yes, it forced me to think about what could go wrong if the user were to utilize my code before anything actually goes wrong. This form of testing made me think in a different way too. For instance I noticed that if I thought I would need to use a loop for a test, I would often be in a loop type mindset and would have to swing out of thinking in the form of loops when actually writing my code.

…ss Owner, and the code passes the test. Starting to work on storing user information and how to incorprate owner info into class Account
…l test run and work with code now, Wave 2 tests complete
…file name. Fixed a couple bugs in account.rb and account_specs so that rake runs
…ted and there are no errors for savings_account.rb, account had a couple adjustments. Added very few things to get me started on checking_account.rb
…older is in week_three and no longere in ..week_three/Tuesday/
…ode code for checking_account.rb. Made small sweeds to savings_account and the specs for it.
…cks too, comments still need to be made but for now... the project is complete with working tests for baseline requirements
…ri / Chris... any suggestions would be great.
@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. Nice job using the optional parameter in the initialize.
Wave 2
All stubbed tests are implemented fully and pass Yes
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. If you use return inside of your loop on line 41, then you would save yourself processing time. If you find the account as the first account, you shouldn't continue looping through all of the rest of the accounts.
Wave 3
All stubbed tests are implemented fully and pass Yes. You could DRY the tests up by putting the object instantiation in the before block instead of in each individual test. Nice job using the times for the duplicated logic in the check tests.
Used inheritance in the initialize for both Checking and Savings Accounts (min balance) Yes - though the min balance logic is duplicated in the savings account. I'm not sure exactly what line 12 is doing in the checking account initialize. Isn't that already happening in the parent class's initialize?
Used inheritance for the withdraw in checking and savings accounts Yes - halfway. Utilizing super with an adjusted amount in the checking account which is great. The savings account logic is duplicated.
Baseline
Used Git Regularly Yes. Nice job with frequency and messages.
Answer comprehension questions Yes. I appreciated your description of how testing has impacted your programming practice.
Extras Nice job with Owner optional (and tests).
Overall Nice job. Seems like you got good practice with testing

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