Question: [ Design Pattern ] 2. (a) What are the relationships between the Facade and Abstract Factory patterns? (b) 5 10 VISITOR NODE VISITOR_1 VISITOR_2 NODE
[Design Pattern]
![[Design Pattern] 2. (a) What are the relationships between the Facade and](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f312f444c49_13166f312f3bb6a8.jpg)
2. (a) What are the relationships between the Facade and Abstract Factory patterns? (b) 5 10 VISITOR NODE VISITOR_1 VISITOR_2 NODE NODE 2 Answer the following questions according to the above diagram. i) Describe the features required in each deferred class, and a typical effective class in each hierarchy, to support the pattern. ii) Suppose a class NODE_C is added as a subclass of NODE. List and describe the required changes to all of the classes affected by the addition. 111) Would you advise using the Visitor Pattern if the NODE hierarchy changed frequently? Explain your answer. iv) Describe the type of applications that are suitable for the Visitor Pattern. v) Explain the term "Double Dispatch" in visitor pattern. (c) Use the Composite pattern, to model the notion of a folder in Windows XP. Folders may be nested, and may also contain text files and binary files. Files may be opened, closed, and 5 drawn on the screen. Folders may also have items added to and removed from them. Draw the UML diagram for the described model. (d) Explain the intent and motivation of Command pattern. 5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
