Skip to content

BankAccounts#13

Open
sophiabaldonado wants to merge 31 commits intoAda-C5:masterfrom
sophiabaldonado:master
Open

BankAccounts#13
sophiabaldonado wants to merge 31 commits intoAda-C5:masterfrom
sophiabaldonado:master

Conversation

@sophiabaldonado
Copy link

Worked on by Sophia Baldonado.

I have to require CSV but I think that's part of ruby.

I'm really excited that I was able to define most of the behavior in the base class, Account. I had some trouble with Constants so I ended up having to assign them to instance variables and use them that way but I think I will look into them more. I just have to target them differently with self.class::CONSTANT I think.

Bank module contains Account and Owner classes. Account accepts an id and initial balance and an optional owner. Account contains methods to deposit and withdraw from the account balance. Owner accepts a hash containing identifying information about the account owner.
Tried to tackle the all method by both creating all instances of Account from a csv file and returning them in an array. Need to collect the data from csv in a method separately and return all instances in its own method. Oh god, send help.
Separated the responsibilities of create_from_csv to three methods for clarity. csv_data only reads data from a specific csv file. accounts creates accounts based on the csv_data. all returns an accounts.
…, compares a given input to the ids of accounts and returns account if it matches;
…can read a given csv file and put into array;
…_data; changed required parameters for Owner class;
… each line in csv to create owner instance from hash;
…s method can return the correct instance of Owner when given one account id;
…ass that has unique min balance and withdraw fee constants;
…interested based on input rate; Refer to balance method instead of balance instance variable wherever possible;
…Account withdraw method but includes some unique variables for this case; Created reset_checks method to reset the number of checks used to 0;
…counts; Made method to handle initial balance errors; Override withdraw_error method in MoneyMarketAccount;
…ls count as transactions, also reset count method; MoneyMarketAccount has special rules about transaction counts;
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