Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

QUESTION 1 [ 1 5 points ] Table 1 shows the difference between decorator pattern and Inheritance. Please write which label ( Decorator , Inheritance

QUESTION 1[15 points]
Table 1 shows the difference between decorator pattern and Inheritance. Please write which label (Decorator,Inheritance) the columns belong to.
Table 1
\table[[?,?],[Used to extend the functionality of a particular object.,\table[[Used to extend the functionality of a class of],[objects.]]],[Does not require subclassing.,Requires subclassing.],[Dynamic.,Static.],[Runtime assignment of responsibilities.,Compile time assignment of responsibilities.],[\table[[Prevents the proliferation of subclasses leading to less],[complexity and confusion.]],\table[[Could lead to numerous subclasses, exploding],[class hierarchy on specific occasions.]]],[More flexible.,Less flexible.],[\table[[Possible to have different decorator objects for a given],[object simultaneously. A client can choose what],[capabilities it wants by sending messages to an],[appropriate decorator.]],\table[[Having subclasses for all possible combinations of],[additional capabilities, which clients expect out of],[a given class, could lead to a proliferation of],[subclasses.]]],[\table[[Easy to add any combination of capabilities. The same],[capability can even be added twice.]],Difficult.]]
image text in transcribed

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

Databases DeMYSTiFieD

Authors: Andy Oppel

2nd Edition

0071747990, 978-0071747998

More Books

Students also viewed these Databases questions

Question

2. Are there more men or women? (find statistics)

Answered: 1 week ago

Question

understand how design and writing connect in mass communication.

Answered: 1 week ago

Question

Who is the audience?

Answered: 1 week ago