Public class Domino {
private int num;
public Domino nextBone;
public Domino(int num) {
this.num = num;
}
public void connect(Domino bone) {
this.nextBone = bone;
}
public void push() {
if (nextBone != null)
nextBone.push();
System.out.println("Clack! " + num);
}
}