■ CONTENTS
xiv
Replace Exception with Test........................................................................................210
Motivation...........................................................................................................................................210
Mechanics ..........................................................................................................................................210
Summary .....................................................................................................................210
■ Chapter 12: Simplifying Generalization Relationships.....................................211
Pull Up Field.................................................................................................................211
Motivation...........................................................................................................................................211
Mechanism .........................................................................................................................................212
Example..............................................................................................................................................212
Pull Up Method ............................................................................................................213
Motivation...........................................................................................................................................213
Mechanism .........................................................................................................................................214
Example..............................................................................................................................................214
Pull Up Constructor Body.............................................................................................216
Motivation...........................................................................................................................................216
Mechanism .........................................................................................................................................217
Example..............................................................................................................................................217
Push Down Method......................................................................................................220
Motivation...........................................................................................................................................220
Mechanism .........................................................................................................................................220
Example..............................................................................................................................................220
Push Down Field ..........................................................................................................223
Motivation...........................................................................................................................................223
Mechanism .........................................................................................................................................223
Example..............................................................................................................................................223
Extract Subclass ..........................................................................................................226
Motivation...........................................................................................................................................226
Mechanism .........................................................................................................................................226
Example..............................................................................................................................................227