Question: Provide a design to create salad objects for Garden salad and Chef salad. A Garden salad has avocado and mushrooms as its major ingredients, while
Provide a design to create salad objects for Garden salad and Chef salad. A Garden salad has avocado and mushrooms as its major ingredients, while a Chef salad has eggs and ham. Both Garden salad and Chef salad have common ingredients: lettuce, tomatoes, and cheese. It is alright for a customer to get a Chef salad with some avocado or mushrooms. Likewise, a Garden salad can also have eggs or ham added. Besides, customers can exclude some ingredients to save money. What design pattern is good for this purpose? Utilize the composite recursive design pattern to show the relationships in this design. Please provide a UML class diagram.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
