Advertisement
Guest User

Untitled

a guest
Nov 25th, 2015
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. %% BANKCLIENTCLASS
  2. % Object who represent the client. This is the superclass wher we initialize the properties of the client
  3. % and update his amount.
  4. %%
  5. classdef BankClientClass
  6. %% Client properties
  7. % Defining the parameters that Superclass and Childclas need. It define the
  8. % propierties for a client account.
  9. properties
  10. name; %Name of the account owner
  11. deposit; %Ammount of money in the account
  12. interest_rate; %Interest rate in percentage
  13. interest_ammount; %Ammount of money will increase after the time has passed (
  14. minimum_month; %Minimum time without widraw/deposit in the account to receive the interest
  15. interest_rate_period %The fraction of interest rate in the period settled (= minimum months / 12)
  16. end
  17. %% Client methods
  18. % Here are the constructor and functions neccesaries for client
  19. methods
  20. %Constructor
  21. function obj=BankClientClass()
  22. end
  23.  
  24. %Updates the ammount of the interest each time money is moved in
  25. %the deposit
  26. function obj=updateInterestAmmount(obj)
  27. %Interest amount is iqual to the fraction of the interest rate times
  28. %the ammount of the deposit
  29. obj.interest_ammount = (obj.interest_rate_period * obj.interest_rate * obj.deposit) / 100;
  30. end
  31. end
  32. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement