|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--jeops.examples.fibonacci.Fibonacci
This class models an encapsulation for a solution for the Fibonacci series.
| Field Summary | |
int |
n
The order of this element of the series. |
Fibonacci |
son1
The first subproblem used to solve this recursion. |
Fibonacci |
son2
The second subproblem used to solve this recursion. |
int |
value
The value of the element in the series. |
| Constructor Summary | |
Fibonacci(int n)
Class constructor. |
|
| Method Summary | |
int |
getN()
Returns the order of this element of the series. |
Fibonacci |
getSon1()
Returns the first subproblem used to solve this recursion. |
Fibonacci |
getSon2()
Returns the second subproblem used to solve this recursion. |
int |
getValue()
Returns the value of this element of the series. |
void |
setSon1(Fibonacci newValue)
Defines the first subproblem used to solve this recursion. |
void |
setSon2(Fibonacci newValue)
Defines the second subproblem used to solve this recursion. |
void |
setValue(int newValue)
Defines the value of this element in the series. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
public int n
public int value
public Fibonacci son1
public Fibonacci son2
| Constructor Detail |
public Fibonacci(int n)
n - the order of the series.| Method Detail |
public int getN()
public Fibonacci getSon1()
public Fibonacci getSon2()
public int getValue()
public void setSon1(Fibonacci newValue)
newValue - the first subproblem used to solve this recursion.public void setSon2(Fibonacci newValue)
newValue - the second subproblem used to solve this recursion.public void setValue(int newValue)
newValue - the value of this element in the series.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||