import java.util.*;public class LockDataStructureClass implements LockADT{//Receive User InputScanner keyboard = new Scanner(System.in);//Instance Variables for the Lock (Combination)private int x;private int y;private int z;//Instance variable to return number currently at topprivate int pointer;//Boolean to Lock/Unlockprivate boolean status;//Default Constructorpublic LockDataStructureClass(){x
...[Show More]
import java.util.*;
public class LockDataStructureClass implements LockADT
{
//Receive User Input
Scanner keyboard = new Scanner(System.in);
//Instance Variables for the Lock (Combination)
private int x;
private int y;
private int z;
//Instance variable to return number currently at top
private int pointer;
//Boolean to Lock/Unlock
private boolean status;
//Default Constructor
public LockDataStructureClass()
{
x = 0;
y = 0;
z = 0;
pointer = 0;
status = true;
}
//Overloaded Constructor
public LockDataStructureClass(int x, int y, int z)
{
this.x = x;
this.y = y;
this.z = z;
}
//Set the First Number
public void setX(int x)
{
this.x = x;
//Assign value of X to Pointer
pointer = x;
}
//Set the Second Number
public void setY(int y)
{
this.y = y;
//Assign value of Y to Pointer
pointer = y;
}
//Set the Last Number
public void setZ(int z)
{
this.z = z;
//Assign value of Z to Pointer
pointer = z;
[Show Less]