Types and inheritance

\comment{See  [HOB87].} \sly{types}{

O{\rm bject} O{\rm riented} M{\rm ethodology}

\nl {\footnotesize increases programmer productivity by enhancing software maintainability, extensibility and reusability ! }

OOP $\stackrel{blurs}{=}$ design + implementation

{\bf Well designed type structure:} minimize and localize dependencies among types ! } \sli{ {\bf Object = state + behavior} Subtyping Inheritance ( -> type hierarchy graph ) [] overriding, virtual functions / methods\n {\bf Protection:} private, public, protected \n } \sli{

Type = objects with similar behavior

[] super type: \fbox{{\bf interface}}\n [] implementation is left to subtypes

Where to put functionality?

reusability -- how useful is the code?\n complexity -- how difficult to implement?\n applicability -- how relevant to the type?\n implementation -- how dependent? \n } \sli{

Subtyping (design methodology)

{\footnotesize C.f. decomposition : (data/procedural abstraction)} \nl Specialization -- conceptual hierarchies\n Implementation -- to realize a supertype\n Combination -- multiple inheritance

Nonstandard subtyping:\n

Generalization -- e.g. Win -> ColorWin \n Variance -- e.g. {\it Mouse -> Tablet} [Pointing]\n Limitation -- e.g. {\it Deque -> Stack } \nln {\footnotesize {\bf []} Creativity and clear headed thinking are the most important ingredients of design } ! \n }