Skip to content

Commit

Permalink
Added the add_interest method for the MMA.
Browse files Browse the repository at this point in the history
  • Loading branch information
aniagonzalez committed Mar 4, 2016
1 parent aed2b06 commit c2f8509
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions accounts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,12 @@ def reset_transactions
@transaction_count = 0
end

def add_interest(rate)
interest = @balance * rate/100
@balance = @balance + interest
return interest
end


end

Expand Down

0 comments on commit c2f8509

Please sign in to comment.