Question: EXAMPLE 1.1 An automated teller machine (ATM) enables a user to perform certain banking operations from a remote location. It must support the following operations.


EXAMPLE 1.1 An automated teller machine (ATM) enables a user to perform certain banking operations from a remote location. It must support the following operations. 1. Verify a user's Personal Identification Number (PIN 2. Allow the user to choose a particular account. 3. Withdraw a specified amount of money. 4. Display the result of an operation 5. Display an account balance. A class that implements an ATM must provide a method for each operation. We can write this requirement as the interface ATM and save it in file ATM.java, shown in Listing 1.1. The keyword interface on the header line indicates that an interface is being declared. If you are unfamiliar with the documentation style shown in this listing, read about Java documenta- tion at the end of Section A.7 in Appendix A LISTING . Interface ATM.java The interface for an ATM. public interface ATM t **Verifies a user's PIN @param pin The user's PIN @return Whether or not the User's PIN is verified boolean verifyPIN(String pin); A11ows the user to select an account. areturn a String representing the account selected
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
