Skip to content

Conversation

@annamm77
Copy link

@annamm77 annamm77 commented Mar 5, 2016

Met primary requirements - no optional enhancements.

Looking forward to getting feedback on this!

…es a balance and id number. Displays Argument Error if balance is not an integer and greater than 0. Stores instance vars balance and id. Created withdraw method. Fails if withdrawl would cause account balance to go lower than 0. Otherwise will withdraw and update account balance. Created deposit method which also updates account balance. Created check_balance method which displays current balance.
…ed define_user method in Account Class. Still working on how to create a new instance of Owner within the Account class, see lines 45-56. Eventually will need to add in more variables to Owner class, see lines 4 and 7.

git status
ack what help
…t to get Owner class to initialize within Account.
…ill won't accept a new @owner Bank::Owner even though it will work in IRB, when unattached to the method...? Dunno. Oh wellgit status
added shells for self.all and self.find(id) methods in Accounts.

successfully linked csv file.

need to figure out how to auto-create new instances of Account using csv data.
Finally figured out how to create a loop for creating Bank::Accounts from the CSV doc.
Also uncovered bug: ArgumentError for balance initailizer breaks  self.all method. Turning off the error for now.
Currently it will take the argument (id_num). Loop doesn't work as-is. It will display YAY if it's 1212 but won't work for any other id num...
Fixed the loop, it will now recognize whether or not an id num is in the array,
it will put "YAY" if it is found. Yay, indeed...
self.find method appears functional, however when it displays
the new Bank::Account instance it does not show the initial
arguments. see lines 37-38.

All else seems functional, except for ArgumentError which I haven't delved into yet.
Now in the self.all method the id and balance are converted from strings to integers.
So the ArgumentError works now! YAY! on to wave 3.
SavingsAccount is a subclass of Account. Adopted all methods from Account.

Overridden initialize method. Overridden withdraw method.
Created withdraw_using_check method, added @checkNum to Checking Account.
Caught a bug where self.find wasn't working anymore in Accounts. Updated code so it now returns correct Bank Account afer searching
Extracted numbers and replaced with these variables: @transaction_fee and @balance_min.
Added @transacation_fee, @balance_min, and @withdrawl_bal_min = 0 to initializer.

@tranasaction_fee will come into play with Checking/Savings.
@balance_min is used in initilizer for the Argument Error.
@withdrawl_bal_min is used in withdrawl method.

Tested Account class and seems to work.
…nd @balance_min and @withdrawl_bal_min in these methods: initialize, withdraw.
Added unique class variables to CheckingAccount:
@checkNum
@check_bal_min
@no_checks_fee

Changed "puts" to "returns".

Added verbage to CheckingAccount outputs in def withdraw.
Added transaction fee to Account withdraw method,
so no need for Savings and Checking withdraw override methods.

Updated Savings and Checking initialize override method.
Now is "super" and different @transaction_fee, @balance_min, @withdrawl_bal_min
and displays Argument Error.
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.

1 participant