a) A description of the scenario and the relevant objects in it. b) A class diagram illustrating the use of the composite design pattern. c) A description, with code snippets, of an implemented solution to the scenario without using the composite design pattern.
Task description
Describe an example scenario where it is applicable to use the composite design pattern. You should not use the assembly-part stock control scenario described in lectures. You can make use of other sources for scenario ideas, but you should reference them appropriately. Your answer should include the following:
a) A description of the scenario and the relevant objects in it.
b) A class diagram illustrating the use of the composite design pattern.
c) A description, with code snippets, of an implemented solution to the scenario without using the composite design pattern.
d) A description, with code snippets, of an implemented solution to the scenario using the composite design pattern, making reference to how the implementation in c) was adapted.
e) Your answers to c) and d) should include a discussion of data structures used, any association, aggregation, or composition relationships, inheritance relationships, and the use of polymorphism

Step by step
Solved in 2 steps with 1 images









