Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

[ 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]

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft Visual Basic 2017 For Windows Web And Database Applications

Authors: Corinne Hoisington

1st Edition

1337102113, 978-1337102117

More Books

Students also viewed these Databases questions

Question

What are the advantages of special-purpose simulation languages?

Answered: 1 week ago