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.12. Class Deposit

Class Deposit (Fig. J.11) inherits from Transaction and represents an ATM deposit transaction. Recall from the class diagram of Fig. 11.20 that class Deposit has one attribute, amount, which line 6 implements as a Decimal instance variable. Lines 7–8 create reference attributes keypadHandle and depositSlotHandle that implement the associations between class Deposit and classes Keypad and DepositSlot modeled in Fig. 11.19. Line 11 declares a constant CANCELED that corresponds to the value a user enters to cancel. We will soon discuss how the class uses this constant.

Figure J.11. Class Deposit represents an ATM deposit transaction.
					1
					' Deposit.vb
					2
					' Represents a deposit ATM transaction.
					3
					Public Class Deposit
 4
					Inherits

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