+1(805) 568 7317

i am having trouble with the open method in this code it issuposed to change the boo 4947208

I am having trouble with the open method in this code. It issuposed to change the boolean lockOpen to true if the combinationput into the array is equal to the array combination. Bellow is thecode public class Lock extends InvalidLockCombinationException {    private boolean lockOpen = true;    private int[] comb = new int[3];    private int upper;    private int[] guess = new int[3];    public Lock(int aLimit, Combination myCombo) {        this.upper = aLimit;        int[] comb =myCombo.getNumbers();        for (int i = 0; i

This method returns an int representing the dials upper limit. 3. public boolean open(Combination testMe) This method returns a boolean representing whether or not thelock is open. If the received Combination equals the lock’sCombination, then set the lock’s state to open. If the lock isalready open, then lock will remain open regardless of thereceived 3 Combination. Hint: use Combination.equals(otherCombination) tocheck if two combinations are equal. 4. public void close()

This method sets the lock’s state to closed. 5. public boolean isOpen()

This method returns true if the lock is open or false if the lockis closed. Test your code against . . .

"Order a similar paper and get 15% discount on your first order with us
Use the following coupon

Order Now