Skip to main content
Contents Index
Dark Mode Prev Up Next Profile
\(
\newcommand{\lt}{<}
\newcommand{\gt}{>}
\newcommand{\amp}{&}
\definecolor{fillinmathshade}{gray}{0.9}
\newcommand{\fillinmath}[1]{\mathchoice{\colorbox{fillinmathshade}{$\displaystyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\textstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptscriptstyle\phantom{\,#1\,}$}}}
\)
Chapter 19 Inheritance
So far we have looked at two ways to implement βhas-aβ relationships: composition and aggregation. In this chapter, we will examine a new kind of relationship between objects, βis-aβ.
Is-a relationships in object-oriented programming are established through a technique called
inheritance .