Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. /**
  2.  * Represents the keypad of the ATM
  3.  */
  4.  
  5. // Keypad.java
  6. // Represents the keypad of the ATM
  7. import java.util.Scanner; // program uses Scanner to obtain user input
  8.  
  9. public class Keypad {
  10.     private Scanner input; // reads data from the command line
  11.  
  12.     // no-argument constructor initializes the Scanner
  13.     public Keypad() {
  14.         input = new Scanner(System.in);
  15.     } // end no-argument Keypad constructor
  16.  
  17.     // return an integer value entered by user
  18.     public int getInput() {
  19.         return input.nextInt(); // we assume that user enters an integer
  20.     } // end method getInput
  21. } // end class Keypada