|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jeops.examples.factorial.Fact
Class used to solve the factorial problem (N!) with JEOPS.
Constructor Summary | |
Fact(int n)
Class constructor. |
Method Summary | |
int |
getN()
Returns the number whose factorial we are trying to find. |
int |
getResult()
Returns the factorial of n. |
Fact |
getSubProblem()
Returns the factorial of (n - 1). |
boolean |
isOk()
Checks whether this problem is already solved. |
void |
setResult(int value)
Defines the factorial of n. |
void |
setSubProblem(Fact value)
Defines the factorial of (n - 1). |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public Fact(int n)
n
- the number whose factorial we are trying to find.Method Detail |
public int getN()
public boolean isOk()
true
if this problem is already solved;
false
otherwise.public int getResult()
public void setResult(int value)
value
- the factorial of n.public Fact getSubProblem()
public void setSubProblem(Fact value)
value
- the factorial of (n - 1).
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |