Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Keypad.java
- //represents the ATM's Keypad
- import java.util.Scanner;//scanner to obtain input;
- public class Keypad
- {
- private Scanner input;//reads data from command line
- //no-argument costructor initializes the scanner
- public Keypad()
- {
- input = new Scanner(System.in);
- }//end of no-argument costructor
- //return an integer value entered by user
- public int getInput()
- {
- return input.nextInt();
- }//end method getInput
- }//end class Keypad
Advertisement
Add Comment
Please, Sign In to add comment