|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectframework.Problem
waterjug.WaterJugProblem
public class WaterJugProblem
This class represents the Water Jug problem. It provides an introductory message describing the problem, stores the problem's possible moves and current state, and checks for whether the problem has been successfully solved. Note that this class extends the abstract class Problem and therefore imports framework.Problem. This class inherits the setIntroduction(), setCurrentState(), and setMoves() methods from its parent and thus it should not have any instance fields for these attributes.
Constructor Summary | |
---|---|
WaterJugProblem()
Constructs a new water jug problem object. |
Method Summary | |
---|---|
boolean |
success()
Returns whether the current state of this problem is a success. |
Methods inherited from class framework.Problem |
---|
getCurrentState, getIntroduction, getMoves, setCurrentState, setIntroduction, setMoves |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WaterJugProblem()
Method Detail |
---|
public boolean success()
success
in class Problem
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |