ilham_syamsuddin

Untitled

Oct 29th, 2017
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. //Keypad.java
  2. //represents the ATM's Keypad
  3. import java.util.Scanner;//scanner to obtain input;
  4.  
  5. public class Keypad
  6. {
  7. private Scanner input;//reads data from command line
  8.  
  9. //no-argument costructor initializes the scanner
  10. public Keypad()
  11. {
  12. input = new Scanner(System.in);
  13. }//end of no-argument costructor
  14.  
  15. //return an integer value entered by user
  16. public int getInput()
  17. {
  18. return input.nextInt();
  19. }//end method getInput
  20. }//end class Keypad
Advertisement
Add Comment
Please, Sign In to add comment