|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectabstractions.Balance
models.UnrestrictedBalance
public class UnrestrictedBalance
Constructor Summary | |
---|---|
UnrestrictedBalance(int[] weights)
|
Method Summary | |
---|---|
void |
weigh(int x)
|
Methods inherited from class abstractions.Balance |
---|
addLeft, addRight, maxNumberOfWeights, maxThatCanBeWeighed, moveAllToTable, removeLeft, removeRight, toString, weighing, weightsInLeft, weightsInRight |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public UnrestrictedBalance(int[] weights)
Method Detail |
---|
public void weigh(int x)
x
- is the weight that we wish to weigh in the right pan. This method should
move the weights around in order to weigh this amount. If no exact solution is found then it
should find a solution as close as possible to the one required.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |