Believe it or not, there’s still more. Yes, with over 550 pages under your belt, there are still things we couldn’t cram in. Even though these last ten topics don’t deserve more than a mention, we didn’t want to let you out of Objectville without a little more information on each one of them. But hey, now you’ve got just a little bit more to talk about during commercials of CATASTROPHE... and who doesn’t love some stimulating OOA&D talk every now and then?
Besides, once you’re done here, all that’s left is another appendix... and the index... and maybe some ads... and then you’re really done. We promise!
Lots of times in OO programming circles, you’ll hear someone talk about the IS-A and HAS-A relationships.
Usually, IS-A relates to inheritance, for example: “A Sword IS-A Weapon, so Sword should extend Weapon.”
HAS-A refers to composition and aggregation, so you might hear, “A Unit HAS-A Weapon, so a Unit can be composed with a Weapon object.”
The reason we haven’t covered IS-A and HAS-A much is that they tend to break ...