Sunday, April 27, 2008

Compatibilty


Name: Compatibilty (Also known as feasible combination or legal combination)

Intent: To model allowable combination of two sets of class instances in an extensible fashion.

We may use this model is we have to model set of classes( generalized/specialized set) which are associated to multiple classes of another set of classes ( generalized/specialized set), e.g different types of car need to be associated to different types of condition and use; where types of car can be a set of specialized classes (truck, cars , hybrid, motorcycles etc.) and (passenger, heavy goods, earth movers etc) can be another set of classes depending on the usage and conditions. If we use specialization between the 2 sets we get a rigid design which would need to be updated everytime a new type is to be added or updated to either of the sets. So we can use the specification classes to capture the different type of cars and conditions by creating specification classes called typeofcar and typeofenvironment class, now the the associations between the classes which were captured individually can be captured using an association class between the specification class. This model makes the design more flexible.

No comments: