|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--NQueens
Environment-Based Applications:
The NQueens class implements the N Queens problem.
Constructor Summary | |
NQueens(int n,
SettableEnvDisplay d)
Constructs an object that solves the N Queens Problem. |
Method Summary | |
int |
numQueens()
Returns the number of queens to be placed on the board. |
boolean |
solve()
Solves (or attempts to solve) the N Queens Problem. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public NQueens(int n, SettableEnvDisplay d)
n
- the number of queens to be placed on an
n
x n
boardd
- an object that knows how to display an
n
x n
board and
the queens on itMethod Detail |
public int numQueens()
public boolean solve()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |