Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %% BANKCLIENTCLASS
- % Object who represent the client. This is the superclass wher we initialize the properties of the client
- % and update his amount.
- %%
- classdef BankClientClass
- %% Client properties
- % Defining the parameters that Superclass and Childclas need. It define the
- % propierties for a client account.
- properties
- name; %Name of the account owner
- deposit; %Ammount of money in the account
- interest_rate; %Interest rate in percentage
- interest_ammount; %Ammount of money will increase after the time has passed (
- minimum_month; %Minimum time without widraw/deposit in the account to receive the interest
- interest_rate_period %The fraction of interest rate in the period settled (= minimum months / 12)
- end
- %% Client methods
- % Here are the constructor and functions neccesaries for client
- methods
- %Constructor
- function obj=BankClientClass()
- end
- %Updates the ammount of the interest each time money is moved in
- %the deposit
- function obj=updateInterestAmmount(obj)
- %Interest amount is iqual to the fraction of the interest rate times
- %the ammount of the deposit
- obj.interest_ammount = (obj.interest_rate_period * obj.interest_rate * obj.deposit) / 100;
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement