O'Reilly logo

Visual Basic 2005 for Programmers: Deitel Developer Series, Second Edition by Harvey M. Deitel - Deitel & Associates, Inc., Paul J. Deitel - Deitel & Associates, Inc.

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required