WebCab Bonds Demo
(J2EE Edition)

com.webcab.ejb.finance.interest
Interface Developer

All Superinterfaces:
EJBObject, Remote

public interface Developer
extends EJBObject

Within this Enterprise JavaBean we offer methods for the evaluation of arithmetic and geometric progressions.


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 interface javax.ejb.EJBObject
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove
 

Method Detail

sumArithmeticSeries

public double sumArithmeticSeries(double firstTerm,
                                  double commonDifference,
                                  int numberOfTerms)
                           throws DeveloperDemoException,
                                  RemoteException
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
DeveloperDemoException
RemoteException

sumFiniteGeometricSeries

public double sumFiniteGeometricSeries(double firstTerm,
                                       double commonRatio,
                                       int numberOfTerms)
                                throws DeveloperDemoException,
                                       RemoteException
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
DeveloperDemoException
RemoteException
See Also:
sumInfiniteGeometricSeries(double, double)

sumInfiniteGeometricSeries

public double sumInfiniteGeometricSeries(double firstTerm,
                                         double commonRatio)
                                  throws DeveloperDemoException,
                                         RemoteException
Returns the sum of an infinite geometric series.
An infinite geometric series is an indefinite sum of terms and is denoted by:
S=a+aR2+aR3+...
where `...' denotes that the sum extends in a similar fashion indefinitely.

If the modulus (i.e. absolute value) of the common ratio (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
DeveloperDemoException
RemoteException
See Also:
sumFiniteGeometricSeries(double, double, int)

WebCab Bonds Demo
(J2EE Edition)