views:

69

answers:

3

Hello

I have a program which models manufacturing process. In each stage of the process , objects are created. Specific objects can be created only in certain stage . The objects created in later stage, are using the objects created in earlier stages i.e output of previous stage is input to later stage.Which design pattern to use to model this behavior? I am not recognizing in this, any patterns that I am aware of.

Thanks

+3  A: 

You probably want the Builder Pattern (Wikipedia) building a Composite.

More resources here (c2com) and here (Java).

In general, always take a look at the most popular patterns list, and use them as guidelines, never allow a pattern to pattern your thinking :>

Kornel Kisielewicz
A: 

Maybe you can model you application on a Finite State Machine?

troelskn
+1  A: 

what about Pipeline ?

Benny