2.2.4 Classes and Objects |
For instance the class Account would have an account number attribute and a withdraw method. In the system two Account objects could exist one with an account number of 12345 the other with and an account number 67890. If the withdraw method is called on the Account object with an account number of 12345, then code that is executed is the code that is defined on the Account class, however the data that is manipulated is the data for the Account object with the account number 12345.