7 Object-Oriented Relationship
“It’s harder to get out of a bad relationship than a good one.”—Whitney Houston (1963–2012)
Objects don’t live in isolation but exist in relationships with other objects. In this chapter, we’ll look at the object relationships and type relationships that objects and classes/interfaces can have. Basically, two simple types of relationships exist: An object is related to another object by reference, or a class inherits from another class so that the objects can inherit members from the superclass. In this respect, this chapter considers associations for object links and inheritance relationships. In addition, this chapter describes abstract classes and interfaces, which are special inheritance relationships because ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access