O'Reilly logo

Head First Object-Oriented Analysis and Design by Gary Pollice, David West, Brett McLaughlin

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

Appendix A. Leftovers: The Top Ten Topics (we didn’t cover)

image with no caption

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!

#1. IS-A and HAS-A

Lots of times in OO programming circles, you’ll hear someone talk about the IS-A and HAS-A relationships.

IS-A refers to inheritance

Usually, IS-A relates to inheritance, for example: “A Sword IS-A Weapon, so Sword should extend Weapon.”

image with no caption

HAS-A refers to composition or aggregation

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

image with no caption

The problem with IS-A and HAS-A

The reason we haven’t covered IS-A and HAS-A much is that they tend to break ...

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