June 2006
Intermediate to advanced
1344 pages
42h 52m
English
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.
1 ' Deposit.vb 2 ' Represents a deposit ATM transaction. 3 Public Class Deposit 4 Inherits |
Read now
Unlock full access