cs31 lecture 13

Cs31 lecture 13

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: tion: inheritance vs. attribute? When designing a project, a question often occurs Do I make B inherit from A? Or, do I add an object of type A as attribute of B? This can be solved for instance with the “is a” test Both choices can lead to a valid implementation But design may be less clear in one case vs. the other 8 Examples Let’s design a hierarchy for images 9...
View Full Document

This note was uploaded on 04/03/2014 for the course CS 31 taught by Professor Melkanoff during the Fall '00 term at UCLA.

Ask a homework question - tutors are online