Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wave 3 Bank Accounts #67

Open
wants to merge 27 commits into
base: jln/master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
b79bdfe
Add wave 3
kariabancroft Oct 8, 2015
8814190
Merge remote-tracking branch 'upstream/master' into jln/master
noglows Oct 8, 2015
8edeb3f
Made a new bank.rb file that requires all the different account types
noglows Oct 8, 2015
c364b4f
Broke the accounts into different files
noglows Oct 8, 2015
622f68c
Updated old bank.rb file - this will be deleted later
noglows Oct 8, 2015
f851166
Updated fee to a float
noglows Oct 8, 2015
73915bb
Updated withdraw logic so that edge cases are handled
noglows Oct 8, 2015
a04961a
Initial working checking account
noglows Oct 8, 2015
715cb38
Added the reset checks method
noglows Oct 8, 2015
b789fb0
Added money_market_account and modified account withdraw method to ac…
noglows Oct 8, 2015
2406a37
Fixed some money market issues
noglows Oct 9, 2015
cbb30ef
Fixed bug in withdraw method and added add_interest method to parent …
noglows Oct 9, 2015
aaa58fb
Fixed bugs in money market account
noglows Oct 9, 2015
8b98e5a
Modified checking and savings account to take dollars as input instea…
noglows Oct 9, 2015
06832af
Cleaning up files
noglows Oct 9, 2015
6a7a92d
Cleaning up file names
noglows Oct 9, 2015
c021e14
Created retired files folder
noglows Oct 9, 2015
7d83da6
All outputs to the user round to two decimal places
noglows Oct 9, 2015
35448bd
Fixed more rounding errors
noglows Oct 9, 2015
92ba7b1
Added comments to Money Market
noglows Oct 9, 2015
50509e6
Added comments to checking account
noglows Oct 9, 2015
0073289
Added comments to savings account
noglows Oct 9, 2015
f418c1f
Comment to bank.rb file
noglows Oct 9, 2015
3ee8881
Removed the to-do.txt file
noglows Oct 9, 2015
b10b425
Finished comment and fixed money market bug
noglows Oct 12, 2015
e2ef83e
Fixed Money Market withdrawal bug
noglows Oct 12, 2015
76268ff
Removed owner require from Account
noglows Oct 12, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed bugs in money market account
noglows committed Oct 9, 2015
commit aaa58fb17046b494e9d10cea57b57128da701580
7 changes: 6 additions & 1 deletion lib/money_market_account.rb
Original file line number Diff line number Diff line change
@@ -9,8 +9,9 @@ def initialize(id, initial_balance, open_date)
@fee = 0
@money_market_fee = 100
@acct_type = "MoneyMarket"
@allowed_to_withdraw = true

if initial_balance.to_i/100.00 < @min_balance
if initial_balance.to_f < @min_balance
raise ArgumentError, "The balance cannot be less than $#{@min_balance}."
end
end
@@ -42,6 +43,10 @@ def deposit(amount)
end
end

def add_interest(rate)
super
end

def reset_transactions
@transactions = 0
end