user152508
user152508

Reputation: 3131

Which Design pattern

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

Upvotes: 1

Views: 170

Answers (3)

Kornel Kisielewicz
Kornel Kisielewicz

Reputation: 57525

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 :>

Upvotes: 3

Benny
Benny

Reputation: 8815

what about Pipeline ?

Upvotes: 1

troelskn
troelskn

Reputation: 117417

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

Upvotes: 0

Related Questions