5.5. Summary

In this chapter, you learned

  • That an association describes a relationship between classes—that is, a potential relationship between objects of two particular types/classes.

  • That we define the multiplicity of an association between classes X and Y in terms of how many objects of type X can be linked to a given object of type Y, and vice versa. Possible multiplicities are one-to-one (1:1), one-to-many (1:m), and many-to-many (m:m). In all these cases, the involvement of the objects at either end of the relationship may be optional or mandatory.

  • That an aggregation is a special type of association that implies containment.

  • How to derive new classes based on existing classes through inheritance and what the do's and don'ts are when deriving these new classes. Specifically, how we can extend a base class by adding members or specialize a base class by overriding methods.

  • How class hierarchies develop over time, and what we can do to try to avoid "ripple effects" to our application as the class hierarchy changes with evolving requirements.

  • How overloading can be used to create multiple methods with the same name but with different argument signatures.

  • Why multiple inheritance can be so troublesome to implement in an OOPL.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset