Skip to content

Conversation

@birbalds
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? Its useful to be able to use the same class name for different classes. This increases the codes readability. I think for programs with multiple functions will derive great use from classes inside modules.
What is accomplished with raise ArgumentError? What do you think it's doing? Raising an ArgumentError prevents the user from continuing through the program with invalid input/data. I think it verifies the parameters of an argument and if satisfied it continues else-wise a error occurs, exiting the program.
Why do you think we made the .all & .find methods class methods? Why not instance methods? They were class methods because they needed all of the csv data to function. The instance methods functioned on one instance of an account while the class methods used all accounts.
Why does it make sense to use inheritance for the different types of accounts? It condenses code and increases readability, especially having the classes break into different files.
Did the presence of automated tests change the way you thought about the problem? How? I usually strive to make programs as dynamic as possible, the tests (because of their descriptions) helped guide the scope of my program. Tests also helped pin point the problems that arise in my code. Having to write tests first also helped greatly in the planning process of the code.

@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) Instead of repeating this code, can call self.all directly in .find
Used Account.all to get account list in Account.find Same as above. Also, by calling self.all in .find, it will return a collection of Account instances - which means you don't need to use class variables. Class variables should be avoided.
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) Instance variables for id and balance are being set in all initialize methods - should only need to be in the super class, as long as you're calling super. You also only need to set the attr_readers in the super class.
Used inheritance for the withdraw in checking and savings accounts Well Done
Baseline
Used Git Regularly Should commit more often. Good rule is with completing or changing each method. Then the commit message can be specific to what was added, changed or removed.
Answer comprehension questions Well Done
Extras Overall, looks good - just need to focus on utilizing inheritance and passing data through methods instead of using class variables

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