October 2008
Beginner to intermediate
680 pages
16h 48m
English
One question that is often raised by beginning modelers is why we don't use an inheritance relationship to relate the Course and Section classes instead of using a simple association, as we've chosen to do. On the surface, it does indeed seem tempting to want Section to be a derived class of Course because all the fields listed for a Course—courseNumber, courseName, and credits—also pertain to a Section; so, why wouldn't we want Section to inherit them in the same way that Student and Professor inherit all the fields of Person? A simple example should quickly illustrate why inheritance isn't appropriate.
Let's say that because Beginning Object Concepts is such a popular course, the university is offering three ...
Read now
Unlock full access