From 51d39b9621f1130eb24b0575217385ec58c4ac92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Uruba?= Date: Fri, 25 Sep 2015 18:38:12 +0200 Subject: [PATCH] =?UTF-8?q?=E2=80=93=20updated=20readme=20with=20the=20def?= =?UTF-8?q?inition=20of=20the=20SimpleInterestCalculator=20class?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- readme.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/readme.md b/readme.md index 922a370..0f9bc49 100644 --- a/readme.md +++ b/readme.md @@ -505,6 +505,33 @@ namespace `FinanCalc\Calculators\Factories` * * * +### SimpleInterestCalculator +namespace `FinanCalc\Calculators` +* **__construct($principal, $annualInterestRate, TimeSpan $time)** + * *$principal* = **'P'** – amount of principal + * *$annualInterestRate* = **'i'** – annual interest rate (i.e., a decimal number typically lower than 1 and greater than 0) + * *$time* = (converted to years) **'t'** – the total time as a TimeSpan object + +##### Setters +* **setPrincipal($principal)** – sets P +* **setAnnualInterestRate($annualInterestRate)** – sets i +* **setTime(TimeSpan $time)** – sets the total time + +##### Getters +* **getPrincipal()** – gets P +* **getAnnualInterestRate()** – gets i +* **getTime()** – gets the total time as a TimeSpan object +* **getTimeInYears()** – gets the total time in years +* **getTimeInMonths()** – gets the total time in months +* **getTimeInDays()** – gets the total time in days +* **getInterestAmount()** – gets the interest amount ('n') + +#### SimpleInterestCalculatorFactory (*SimpleInterestCalculator's factory object*) +namespace `FinanCalc\Calculators\Factories` +* **newSimpleInterest($principal, $annualInterestRate, TimeSpan $time)** + +* * * + ### StockDividendDiscountModelCalculator namespace `FinanCalc\Calculators` * **__construct(StockDDMTypes $dividendDiscountModelType, $stockVIR, $stockAnnualDividendValue, $stockAnnualDividendsGrowth = null)**