public void enterPincode(int pin) { if (pin == 1234) { Console.WriteLine("Entered valid pin"); machine.setState(machine.getCorrectPinState()); } else { Console.WriteLine("Invalid pin. Rejecting card..."); machine.setState(machine.getNoCardState()); } }
public void rejectCard() { Console.WriteLine("Your card got rejected"); machine.setState(machine.getNoCardState()); }