Class Design

Nathan Sprague

Class Design “Algorithm”

Some Criteria for Evaluating Designs

MIMP Design

Filled diamonds represent composition. An Image is composed of at least one pixel and those pixels generally cease to exist with the Image.
Open diamonds represent aggregation. A MimpApp object may contain zero or one Image objects, but either could exist without the other.
Dotted arrow represents dependency. ImageTransforms must interact with instances of Image and Pixel. Changing the public interfaces of Image or Pixel might require us to make changes to ImageTransforms.

Possible Design Change 1

vs. 

Possible Design Change 2

vs. 

Possible Design Change 3

vs. 

Design Change 4 (Arguably better!)

vs. 

Design Change 5 (Arguably better!)

vs.