Prev Up Next
Go backward to Recasting Algorithms As Objects:
An Alternative to Iterators
Murali Sitaraman

Go up to Foundations and Methodology Comparisons
Go forward to Inheritance, Genericity, and Class Hierarchies
Wolf Zimmermann


Using Genericity to Improve OO Designs
Karsten Weihe

Translating an abstract object-oriented design into a programming language is a difficult task. We consider one particular problem, the classical circle-ellipse dilemma, and discuss various approaches for resolution. It turns out that common approaches either result in an unsafe realization or in a combinatorial explosion of classes. We show that this combinatorial explosion can be avoided to some extent by introducing layers of generic holds-a relations into the inheritance hierarchy. Roughly speaking, these layers turn explicit interrelations between classes into implicit ones, which reduces the complexity of the whole system.


 

Prev Up Next