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

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