< Day Day Up > |
A key goal of object-oriented programming (OOP) is to design the objects for the system to closely mirror the characteristics and behaviors of the real-world objects they represent. The Loan example shows this well; loans have three properties inherent to them: the amount being borrowed (principal), the interest (rate), and the time that will be taken to repay the loan ( term ). These are properties of a loan, and they describe a loan pretty thoroughly. Everywhere we look in the real world, the objects we interact with have properties. Even the book you are reading now has properties, as shown in Table 3.1. Table 3.1. Properties of This Book
Hopefully, this illustrates that properties aren't really that foreign of a concept; everything has properties, even you! |
< Day Day Up > |