Advertisement
Sheero

LockADT

May 24th, 2018
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.88 KB | None | 0 0
  1. //Zehra Baig
  2. //CSC-236-C1
  3. //Lab 2-A
  4.  
  5. public interface LockADT
  6. {
  7.     //Sets value of the first number of the combination
  8.     public abstract void setX(int x);
  9.     //Sets value of the second number of the combination
  10.     public abstract void setY(int y);
  11.     //Sets value of the third number of the combination
  12.     public abstract void setZ(int z);
  13.     //Sets values of all three numbers of the combination
  14.     public abstract void alter(int xValue, int yValue, int zValue);
  15.     //Turns according to rotation number
  16.     public abstract boolean turn(int combo, int turnNumber);
  17.     //Locks the combination lock
  18.     public abstract void close();
  19.     //Attempts to unlock
  20.     public abstract void attempt(int xValue, int yValue, int zValue);
  21.     //Checks if the combination lock is locked or not
  22.     public abstract String inquire();
  23.     //Returns what number is currently at the top of the dial
  24.     public abstract int current();
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement