Visual Basic 2005 for Programmers: Deitel Developer Series, Second Edition
by Paul J. Deitel - Deitel & Associates, Inc., Harvey M. Deitel - Deitel & Associates, Inc.
J.7. Class Account
Class Account (Fig. J.6) represents a bank account. Each Account has four attributes (modeled in Fig. 11.20)—accountNumber, pin, availableBalance and totalBalance. Lines 4–7 implement these attributes as Private instance variables. Note that when we provide a property to access an instance variable, we create the instance variable name by appending Value to the end of the attribute name that was listed in the model. We provide a property with the same name as the attribute name (but starting with a capital letter) to access the instance variable. For example, property AccountNumber corresponds to the accountNumber attribute modeled in Fig. 11.20. Since clients of this class do not need to modify the accountNumberValue instance ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access