J.9. Class Transaction

Class Transaction (Fig. J.8) is an abstract base class that represents the notion of an ATM transaction. It contains the common features of derived classes BalanceInquiry, Withdrawal and Deposit. This class expands upon the “skeleton” code first developed in Section 11.8. Line 3 declares this class to be MustInherit (the Visual Basic equivalent of an abstract class). Lines 4–6 declare the class’s Private instance variables. Recall from the class diagram of Fig. 11.20 that class Transaction contains an property AccountNumber that indicates the account involved in the Transaction. Line 4 implements the instance variable accountNumberValue to maintain the AccountNumber property’s data. We derive attributes screen (implemented ...

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.