WebCab Bonds
v2.01
(J2SE Edition)

webcab.lib.finance.interest
Class Developer

java.lang.Object
  |
  +--webcab.lib.finance.interest.Developer
All Implemented Interfaces:
Serializable

public class Developer
extends Object
implements Serializable

Offers methods for the evaluation of arithmetic and geometric progressions.

See Also:
Serialized Form

Constructor Summary
Developer()
          Creates a new instance.
 
Method Summary
 double sumArithmeticSeries(double firstTerm, double commonDifference, int numberOfTerms)
          Returns the sum of a finite arithmetic series.
 double sumFiniteGeometricSeries(double firstTerm, double commonRatio, int numberOfTerms)
          Returns the sum of a finite geometric series.
 double sumInfiniteGeometricSeries(double firstTerm, double commonRatio)
          Returns the sum of an infinite geometric series.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Developer

public Developer()
Creates a new instance.

Method Detail

sumArithmeticSeries

public double sumArithmeticSeries(double firstTerm,
                                  double commonDifference,
                                  int numberOfTerms)
Returns the sum of a finite arithmetic series.

Parameters:
firstTerm - the first term of the series
commonDifference - the common difference between the terms of the arithmetic progression
numberOfTerms - the number of terms in the series
Returns:
The value of the finite sum of the terms of an arithmetic series.

sumFiniteGeometricSeries

public double sumFiniteGeometricSeries(double firstTerm,
                                       double commonRatio,
                                       int numberOfTerms)
Returns the sum of a finite geometric series.

Parameters:
firstTerm - the first term of the geometric series
commonRatio - the common ratio of the terms within the series
numberOfTerms - the number of terms which the series contains
Returns:
The value of the finite sum of the terms of a geometric series.
See Also:
sumInfiniteGeometricSeries - In order to find the value of the sum of a infinite geometric series.

sumInfiniteGeometricSeries

public double sumInfiniteGeometricSeries(double firstTerm,
                                         double commonRatio)
Returns the sum of an infinite geometric series.

An infinite geometric series is an indefinite sum of terms, namely:

S = a + a * R2 + a * R3 + ...

where '...' denotes that the sum extends in a similar fashion indefinitely.

If the modulus (i.e. absolute value) of the common ratio (i.e. R above) is greater or equal to one then the series will diverge. The series can diverge in one of two ways:

Parameters:
firstTerm - the first term of the geometric series
commonRatio - the common ratio of the terms within the series
Returns:
The value of the sum of an infinite geometric series.
See Also:
sumFiniteGeometricSeries - In order to find the value of the sum of a finite number of terms of a geometric series.

WebCab Bonds
v2.01
(J2SE Edition)