|
WebCab Bonds Demo (J2EE Edition) |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
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 |
public double sumArithmeticSeries(double firstTerm,
double commonDifference,
int numberOfTerms)
throws DeveloperDemoException,
RemoteException
firstTerm - the first term of the seriescommonDifference - the common difference between the terms of the arithmetic progressionnumberOfTerms - the number of terms in the series
DeveloperDemoException
RemoteException
public double sumFiniteGeometricSeries(double firstTerm,
double commonRatio,
int numberOfTerms)
throws DeveloperDemoException,
RemoteException
firstTerm - the first term of the geometric seriescommonRatio - the common ratio of the terms within the seriesnumberOfTerms - the number of terms which the series contains
DeveloperDemoException
RemoteExceptionsumInfiniteGeometricSeries(double, double)
public double sumInfiniteGeometricSeries(double firstTerm,
double commonRatio)
throws DeveloperDemoException,
RemoteException
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:
firstTerm - the first term of the geometric seriescommonRatio - the common ratio of the terms within the series
DeveloperDemoException
RemoteExceptionsumFiniteGeometricSeries(double, double, int)
|
WebCab Bonds Demo (J2EE Edition) |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||