J.2. Class ATM
Class ATM (Fig. J.1) represents the ATM as a whole. Lines 4–10 implement the class’s attributes. We determine all but one of these attributes from the UML class diagrams of Fig. 11.19 and Fig. 11.20. Line 4 declares the Boolean attribute userAuthenticated from Fig. 11.21. Line 5 declares an attribute not found in our UML design—an Integer attribute currentAccountNumber that keeps track of the account number of the current authenticated user. We will soon see how the class uses this attribute. Lines 6–10 declare reference-type attributes corresponding to the ATM class’s associations modeled in the class diagram of Fig. 11.19. These attributes allow the ATM to access its parts (i.e., its Screen, Keypad, CashDispenser and DepositSlot ...
Get Visual Basic 2005 for Programmers: Deitel Developer Series, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.