June 2017
Beginner
1296 pages
69h 23m
English
34.1 True. The minus sign (–) indicates private visibility.
34.2 b.
34.3 The design for class Keypad yields the code in Fig. 34.25. Recall that class Keypad has no attributes for the moment, but attributes may become apparent as we continue the implementation. Also, if we were designing a real ATM, method getInput would need to interact with the ATM’s keypad hardware. We’ll actually read input from the keyboard of a personal computer when we write the complete Java code in Section 34.4.
Keypad based on Figs. 34.1–34.2.
1 // Class Keypad represents an ATM’s keypad
2 public class Keypad {
3 // no attributes have been specified yet
4
5 // no-argument constructor
6 public Keypad() ...Read now
Unlock full access