import javax.swing.JOptionPane ; /** * A test class (aka: "driver" class, aka: "client code") * for the SlotMachine class */ public class SlotMachineTest { public static void main(String[] args) { String input = JOptionPane.showInputDialog ("What is the number on the first disk?") ; int disk1 = Integer.parseInt(input) ; input = JOptionPane.showInputDialog("The second disk?") ; int disk2 = Integer.parseInt(input) ; input = JOptionPane.showInputDialog("The third disk?") ; int disk3 = Integer.parseInt(input) ; SlotMachine bandit = new SlotMachine(disk1, disk2, disk3) ; System.out.println("\n\tYour numbers: " + bandit.toString()) ; if ( bandit.allThreeEqual() ) { System.out.println("\tAll three are equal!") ; } else { System.out.println("\tSorry, you lose!"); } } }