0% found this document useful (0 votes)
216 views

Gof Structural Design Patterns Mock Exams and Answers

Uploaded by

Rana Fathi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
216 views

Gof Structural Design Patterns Mock Exams and Answers

Uploaded by

Rana Fathi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 39

Cover Page

Modeling
and Object
GOF Structural
Patterns
Author: Yasser Ibrahim
Founder @QuizOver.com

Copyright (c) 2014-2015


About Us

Powered by QuizOver.com

The Leading Online Quiz & Exam Creator

Create, Share and Discover Quizzes & Exams

http://www.quizover.com

(2) Powered by QuizOver.com - http://www.quizover.com


QuizOver.com is the leading online quiz & exam creator
Copyright (c) 2009-2015 all rights reserved
Disclaimer

All services and content of QuizOver.com are provided under QuizOver.com terms of use on an "as is" basis,
without warranty of any kind, either expressed or implied, including, without limitation, warranties that the provided
services and content are free of defects, merchantable, fit for a particular purpose or non-infringing.

The entire risk as to the quality and performance of the provided services and content is with you.

In no event shall QuizOver.com be liable for any damages whatsoever arising out of or in connection with the use
or performance of the services.

Should any provided services and content prove defective in any respect, you (not the initial developer, author or
any other contributor) assume the cost of any necessary servicing, repair or correction.

This disclaimer of warranty constitutes an essential part of these "terms of use".

No use of any services and content of QuizOver.com is authorized hereunder except under this disclaimer.

The detailed and up to date "terms of use" of QuizOver.com can be found under:

http://www.QuizOver.com/public/termsOfUse.xhtml

(3) Powered by QuizOver.com - http://www.quizover.com


QuizOver.com is the leading online quiz & exam creator
Copyright (c) 2009-2015 all rights reserved
eBook Content License

Creative Commons License

Attribution-NonCommercial-NoDerivs 3.0 Unported (CC BY-NC-ND 3.0)

http://creativecommons.org/licenses/by-nc-nd/3.0/

You are free to:

Share: copy and redistribute the material in any medium or format

The licensor cannot revoke these freedoms as long as you follow the license terms.

Under the following terms:

Attribution: You must give appropriate credit, provide a link to the license, and indicate if changes were made. You
may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.

NonCommercial: You may not use the material for commercial purposes.

NoDerivatives: If you remix, transform, or build upon the material, you may not distribute the modified material.

No additional restrictions: You may not apply legal terms or technological measures that legally restrict others
from doing anything the license permits.

(4) Powered by QuizOver.com - http://www.quizover.com


QuizOver.com is the leading online quiz & exam creator
Copyright (c) 2009-2015 all rights reserved
Table of Contents

Quiz Permalink: http://www.quizover.com/question/gofstructuraldesignpatternsmockquestions-and-answers

Author Profile: http://www.quizover.com/user/profile/Yasser.Ibrahim

1. Structural Patterns

(5) Powered by QuizOver.com - http://www.quizover.com


QuizOver.com is the leading online quiz & exam creator
Copyright (c) 2009-2015 all rights reserved
4. Chapter: Structural Patterns

1. Structural Patterns Questions

(6) Powered by QuizOver.com - http://www.quizover.com


QuizOver.com is the leading online quiz & exam creator
Copyright (c) 2009-2015 all rights reserved
4.1.1. Which of the following is a Gang of Four (GoF) Structural Design Pa...

Author: JavaChamp Team


Which of the following is a Gang of Four (GoF) Structural Design Pattern?

Please choose all the answers that apply:


• Composite
• Flyweight
• Singleton
• Method Factory

Check the answer of this question online at QuizOver.com:


Question: flyweight gang of four (gof) structural design pattern

Flashcards:
http://www.quizover.com/flashcards/flyweight-gang-of-four-gof-structural-design-pattern?pdf=3044

Interactive Question:
http://www.quizover.com/question/flyweight-gang-of-four-gof-structural-design-pattern?pdf=3044

(7) Powered by QuizOver.com - http://www.quizover.com


QuizOver.com is the leading online quiz & exam creator
Copyright (c) 2009-2015 all rights reserved
4.1.2. You are trying to add a class already written in another applicatio...

Author: JavaChamp Team


You are trying to add a class already written in another application to serve clients, beside other classes, in your
system. All other classes have the same interface, the incoming class has a totally different interface than the
clients expect, but contains all required functionalities.

What kind of refactoring is needed to make this class fit in with minimum changes in your system?

Please choose only one answer:


• apply the Proxy Pattern
• apply the Adapter Pattern
• create a new class which implements the expected interface and copy and paste
the code from the class in the other application to this new class

Check the answer of this question online at QuizOver.com:


Question: when to use gang of four adapter design pattern?

Flashcards:
http://www.quizover.com/flashcards/when-to-use-gang-of-four-adapter-design-pattern?pdf=3044

Interactive Question:
http://www.quizover.com/question/when-to-use-gang-of-four-adapter-design-pattern?pdf=3044

(8) Powered by QuizOver.com - http://www.quizover.com


QuizOver.com is the leading online quiz & exam creator
Copyright (c) 2009-2015 all rights reserved
4.1.3. What is the difference between an adapter and a decorator?

Author: JavaChamp Team


What is the difference between an adapter and a decorator?

Please choose all the answers that apply:


• The adapter adds no functionalities to the adaptee class, whereas the Decorator
extends the functionality of the object
• The adapter is a creational pattern, whereas the decorator is a structural design pattern
• Both introduce a level of indirection between a client class and a class it uses

Check the answer of this question online at QuizOver.com:


Question: gang of four decorator design pattern intent

Flashcards:
http://www.quizover.com/flashcards/gang-of-four-decorator-design-pattern-intent?pdf=3044

Interactive Question:
http://www.quizover.com/question/gang-of-four-decorator-design-pattern-intent?pdf=3044

(9) Powered by QuizOver.com - http://www.quizover.com


QuizOver.com is the leading online quiz & exam creator
Copyright (c) 2009-2015 all rights reserved
4.1.4. Which best defines the use of the Composite Design Pattern?

Author: JavaChamp Team


Which best defines the use of the Composite Design Pattern?

Please choose only one answer:


• the Composite design pattern allows the clients to build a complex
object of smaller different ones
• the Composite design pattern allows adding and removing functionality dynamically
• the Composite design pattern allows the clients to treat
individual objects and compositions uniformly

Check the answer of this question online at QuizOver.com:


Question: when to use the gang of four composite design pattern?

Flashcards:
http://www.quizover.com/flashcards/when-to-use-the-gang-of-four-composite-design-pattern?pdf=3044

Interactive Question:
http://www.quizover.com/question/when-to-use-the-gang-of-four-composite-design-pattern?pdf=3044

(10) Powered by QuizOver.com - http://www.quizover.com


QuizOver.com is the leading online quiz & exam creator
Copyright (c) 2009-2015 all rights reserved
4.1.5. It is also known as Wrapper, it is used when subclassing is not pos...

Author: JavaChamp Team


It is also known as Wrapper, it is used when subclassing is not possible or practical to add functionality and it is
used to add functionality at runtime. This pattern is :

Please choose only one answer:


• Composite
• Adapter
• Decorator
• Proxy

Check the answer of this question online at QuizOver.com:


Question: gang of four wrapper pattern

Flashcards:
http://www.quizover.com/flashcards/gang-of-four-wrapper-pattern?pdf=3044

Interactive Question:
http://www.quizover.com/question/gang-of-four-wrapper-pattern?pdf=3044

(11) Powered by QuizOver.com - http://www.quizover.com


QuizOver.com is the leading online quiz & exam creator
Copyright (c) 2009-2015 all rights reserved
4.1.6. Big portion of clients are remotely invoking methods in your system...

Author: JavaChamp Team


Big portion of clients are remotely invoking methods in your system, the surface area exposed to clients includes
fine-grained methods, which of course causes network overhead.

Which pattern would improve your system performance in this case?

Please choose only one answer:


• Chain of Responsibility Pattern
• Facade Pattern
• Command Pattern
• Adapter Pattern

Check the answer of this question online at QuizOver.com:


Question: when to use gang of four facade pattern?

Flashcards:
http://www.quizover.com/flashcards/when-to-use-gang-of-four-facade-pattern?pdf=3044

Interactive Question:
http://www.quizover.com/question/when-to-use-gang-of-four-facade-pattern?pdf=3044

(12) Powered by QuizOver.com - http://www.quizover.com


QuizOver.com is the leading online quiz & exam creator
Copyright (c) 2009-2015 all rights reserved
4.1.7. It is a pattern used to minimize memory use by letting similar obje...

Author: JavaChamp Team


It is a pattern used to minimize memory use by letting similar objects share as much data as possible stored in a
sharable object.

Please choose only one answer:


• Flyweight
• Composite
• Iterator
• Momento

Check the answer of this question online at QuizOver.com:


Question: what is gang of four flyweight pattern?

Flashcards:
http://www.quizover.com/flashcards/what-is-gang-of-four-flyweight-pattern?pdf=3044

Interactive Question:
http://www.quizover.com/question/what-is-gang-of-four-flyweight-pattern?pdf=3044

(13) Powered by QuizOver.com - http://www.quizover.com


QuizOver.com is the leading online quiz & exam creator
Copyright (c) 2009-2015 all rights reserved
4.1.8. Which pattern is utilized in this example ?
Every character object...

Author: JavaChamp Team


Which pattern is utilized in this example ?

Every character object in a word document has data about the graphical representation and the position, but to
avoid redundant graphical representation data for objects to the same character, it is advisable to extract out
these representation data to one shared object between these objects, and store only the position of each
character internally in each object.

Please choose only one answer:


• Abstract Factory
• Method Factory
• Builder
• Flyweight

Check the answer of this question online at QuizOver.com:


Question: flyweight pattern example

Flashcards:
http://www.quizover.com/flashcards/flyweight-pattern-example?pdf=3044

Interactive Question:
http://www.quizover.com/question/flyweight-pattern-example?pdf=3044

(14) Powered by QuizOver.com - http://www.quizover.com


QuizOver.com is the leading online quiz & exam creator
Copyright (c) 2009-2015 all rights reserved
4.1.9. A pattern known as Surrogate is :

Author: JavaChamp Team


A pattern known as Surrogate is :

Please choose only one answer:


• Adapter
• Proxy
• Facade
• Method Factory

Check the answer of this question online at QuizOver.com:


Question: which pattern is known ad surrogate pattern?

Flashcards:
http://www.quizover.com/flashcards/which-pattern-is-known-ad-surrogate-pattern?pdf=3044

Interactive Question:
http://www.quizover.com/question/which-pattern-is-known-ad-surrogate-pattern?pdf=3044

(15) Powered by QuizOver.com - http://www.quizover.com


QuizOver.com is the leading online quiz & exam creator
Copyright (c) 2009-2015 all rights reserved
4.1.10. Which design pattern can be used to implement Lazy Loading?

Author: JavaChamp Team


Which design pattern can be used to implement Lazy Loading?

Please choose only one answer:


• Adapter
• Mediator
• Proxy
• Chain of Responsibility

Check the answer of this question online at QuizOver.com:


Question: lazy loading design pattern

Flashcards:
http://www.quizover.com/flashcards/lazy-loading-design-pattern?pdf=3044

Interactive Question:
http://www.quizover.com/question/lazy-loading-design-pattern?pdf=3044

(16) Powered by QuizOver.com - http://www.quizover.com


QuizOver.com is the leading online quiz & exam creator
Copyright (c) 2009-2015 all rights reserved
4.1.11. A Proxy Pattern is best used to :

Author: JavaChamp Team


A Proxy Pattern is best used to :

Please choose all the answers that apply:


• control access to a remote object
• assemble complex objects
• fetch a resource-intensive object when requested by a client
• store common redundant data between large number of objects
• extract out from the calling client the access or connection logic needed to call an object

Check the answer of this question online at QuizOver.com:


Question: when to use remote proxy pattern?

Flashcards:
http://www.quizover.com/flashcards/when-to-use-remote-proxy-pattern?pdf=3044

Interactive Question:
http://www.quizover.com/question/when-to-use-remote-proxy-pattern?pdf=3044

(17) Powered by QuizOver.com - http://www.quizover.com


QuizOver.com is the leading online quiz & exam creator
Copyright (c) 2009-2015 all rights reserved
4.1.12. You design an application for an advertis-ement company, which prod...

Author: Yasser Ibrahim


You design an application for an advertis-ement company, which produces different sort of publications such as
books, articles, leaflets, etc.

The company publishes those products in many media formats such as printed material, CD, DVD, online
websites, etc.

How you would model the company products hierarchy (Publications, Media)?

Please choose only one answer:


• Use composite design pattern to enable the publication and media hierarchies to be treated in the same way
as a single instance of an object.
• Use the adapter design pattern to translates publication interface into a compatible media interface.
• Use bridge design pattern to build separate hierarchies for the publications and the media, to decouple the
abstraction from its implementation so that the two can vary independently

Check the answer of this question online at QuizOver.com:


Question: gang of four bridge design pattern

Flashcards:
http://www.quizover.com/flashcards/gang-of-four-bridge-design-pattern?pdf=3044

Interactive Question:
http://www.quizover.com/question/gang-of-four-bridge-design-pattern?pdf=3044

(18) Powered by QuizOver.com - http://www.quizover.com


QuizOver.com is the leading online quiz & exam creator
Copyright (c) 2009-2015 all rights reserved
4.1.13. Which design pattern you would you use to decouple an abstraction f...

Author: Yasser Ibrahim


Which design pattern you would you use to decouple an abstraction from its implementation so that the two can
vary independently?

Please choose only one answer:


• Adapter design pattern
• bridge design pattern
• Facade design pattern
• Composite bridge design pattern

Check the answer of this question online at QuizOver.com:


Question: gof bridge design pattern forces

Flashcards:
http://www.quizover.com/flashcards/gof-bridge-design-pattern-forces?pdf=3044

Interactive Question:
http://www.quizover.com/question/gof-bridge-design-pattern-forces?pdf=3044

(19) Powered by QuizOver.com - http://www.quizover.com


QuizOver.com is the leading online quiz & exam creator
Copyright (c) 2009-2015 all rights reserved
4.1.14. Which of the following are participants in the GOF bridge design pa...

Author: Yasser Ibrahim


Which of the following are participants in the GOF bridge design pattern ?

Please choose all the answers that apply:


• Abstraction
• Bridge
• RefinedAbstraction
• Class Generalization
• Implementor

Check the answer of this question online at QuizOver.com:


Question: what are the bridge design pattern participants?

Flashcards:
http://www.quizover.com/flashcards/what-are-the-bridge-design-pattern-participants?pdf=3044

Interactive Question:
http://www.quizover.com/question/what-are-the-bridge-design-pattern-participants?pdf=3044

(20) Powered by QuizOver.com - http://www.quizover.com


QuizOver.com is the leading online quiz & exam creator
Copyright (c) 2009-2015 all rights reserved
4.1.15. Which design pattern you would you use to translates an existing cl...

Author: Yasser Ibrahim


Which design pattern you would you use to translates an existing class interface into a compatible target
interface?

Please choose only one answer:


• Proxy design pattern
• Adapter design pattern
• Facade design pattern
• Adapter factory design pattern

Check the answer of this question online at QuizOver.com:


Question: gang of four adapter pattern forces

Flashcards:
http://www.quizover.com/flashcards/gang-of-four-adapter-pattern-forces?pdf=3044

Interactive Question:
http://www.quizover.com/question/gang-of-four-adapter-pattern-forces?pdf=3044

(21) Powered by QuizOver.com - http://www.quizover.com


QuizOver.com is the leading online quiz & exam creator
Copyright (c) 2009-2015 all rights reserved
4.1.16. Which of the following are participants in the GOF Adapter design p...

Author: Yasser Ibrahim


Which of the following are participants in the GOF Adapter design pattern?

Please choose all the answers that apply:


• Adapter
• Adaptee
• Bridge
• Target interface

Check the answer of this question online at QuizOver.com:


Question: gang of four adapter design pattern participants

Flashcards:
http://www.quizover.com/flashcards/gang-of-four-adapter-design-pattern-participants?pdf=3044

Interactive Question:
http://www.quizover.com/question/gang-of-four-adapter-design-pattern-participants?pdf=3044

(22) Powered by QuizOver.com - http://www.quizover.com


QuizOver.com is the leading online quiz & exam creator
Copyright (c) 2009-2015 all rights reserved
4.1.17. When would you use the GOF Adapter design pattern?

Author: Yasser Ibrahim


When would you use the GOF Adapter design pattern?

Please choose all the answers that apply:


• to translates an existing class interface into a compatible target interface
• to improve your system performance
• to transforming the client code data into appropriate format expected by the target interface
• to allow classes with incompatible interfaces to work together

Check the answer of this question online at QuizOver.com:


Question: gang of four adapter design pattern applicability

Flashcards:
http://www.quizover.com/flashcards/gang-of-four-adapter-design-pattern-applicability?pdf=3044

Interactive Question:
http://www.quizover.com/question/gang-of-four-adapter-design-pattern-applicability?pdf=3044

(23) Powered by QuizOver.com - http://www.quizover.com


QuizOver.com is the leading online quiz & exam creator
Copyright (c) 2009-2015 all rights reserved
4.1.18. What are the consequences of applying the GOF Adapter pattern?

Author: Yasser Ibrahim


What are the consequences of applying the GOF Adapter pattern?

Please choose all the answers that apply:


• it will improve the system performance
• it makes the client code easier by interacting with a single uniform interface
• it must modify the adaptee class
• it establishes a flexible mechanism for instantiating an object in comparison to the usual java constructor
instantiation.

Check the answer of this question online at QuizOver.com:


Question: gang of four adapter design pattern consequences

Flashcards:
http://www.quizover.com/flashcards/gang-of-four-adapter-design-pattern-consequences?pdf=3044

Interactive Question:
http://www.quizover.com/question/gang-of-four-adapter-design-pattern-consequences?pdf=3044

(24) Powered by QuizOver.com - http://www.quizover.com


QuizOver.com is the leading online quiz & exam creator
Copyright (c) 2009-2015 all rights reserved
4.1.19. What are the common implementation strategies of the GOF Adapter pa...

Author: Yasser Ibrahim


What are the common implementation strategies of the GOF Adapter pattern?

Please choose all the answers that apply:


• Factory Adapter
• Object Adapter
• Class Adapter
• Interface Adapter

Check the answer of this question online at QuizOver.com:


Question: gof adapter pattern implementation strategies

Flashcards:
http://www.quizover.com/flashcards/gof-adapter-pattern-implementation-strategies?pdf=3044

Interactive Question:
http://www.quizover.com/question/gof-adapter-pattern-implementation-strategies?pdf=3044

(25) Powered by QuizOver.com - http://www.quizover.com


QuizOver.com is the leading online quiz & exam creator
Copyright (c) 2009-2015 all rights reserved
4.1.20. Which design pattern you would you use to arrange object hierarchie...

Author: Yasser Ibrahim


Which design pattern you would you use to arrange object hierarchies such that the client code can access both
the individual objects and compositions in a uniform manner ?

Please choose only one answer:


• Adapter design pattern
• Composite design pattern
• Composite adapter design pattern
• Composite factory design pattern

Check the answer of this question online at QuizOver.com:


Question: gang of four composite design pattern forces

Flashcards:
http://www.quizover.com/flashcards/gang-of-four-composite-design-pattern-forces?pdf=3044

Interactive Question:
http://www.quizover.com/question/gang-of-four-composite-design-pattern-forces?pdf=3044

(26) Powered by QuizOver.com - http://www.quizover.com


QuizOver.com is the leading online quiz & exam creator
Copyright (c) 2009-2015 all rights reserved
4.1.21. Which of the following are participants in the GOF Composite design...

Author: Yasser Ibrahim


Which of the following are participants in the GOF Composite design pattern?

Please choose all the answers that apply:


• Component
• Compound
• Leaf
• Connection
• Composite

Check the answer of this question online at QuizOver.com:


Question: java composite pattern example

Flashcards:
http://www.quizover.com/flashcards/java-composite-pattern-example?pdf=3044

Interactive Question:
http://www.quizover.com/question/java-composite-pattern-example?pdf=3044

(27) Powered by QuizOver.com - http://www.quizover.com


QuizOver.com is the leading online quiz & exam creator
Copyright (c) 2009-2015 all rights reserved
4.1.22. What are the consequences of applying the GOF Composite pattern?

Author: Yasser Ibrahim


What are the consequences of applying the GOF Composite pattern?

Please choose all the answers that apply:


• the client code can traverse tree structures of arbitrary depth recursively
• increases the coupling between the client code and the composite structre
• it will improve the system performance
• the client code can access both the individual objects and compositions in a uniform manner

Check the answer of this question online at QuizOver.com:


Question: gang of four composite design pattern consequences

Flashcards:
http://www.quizover.com/flashcards/gang-of-four-composite-design-pattern-consequences?pdf=3044

Interactive Question:
http://www.quizover.com/question/gang-of-four-composite-design-pattern-consequences?pdf=3044

(28) Powered by QuizOver.com - http://www.quizover.com


QuizOver.com is the leading online quiz & exam creator
Copyright (c) 2009-2015 all rights reserved
4.1.23. When would you use the GOF Composite design pattern?

Author: Yasser Ibrahim


When would you use the GOF Composite design pattern?

Please choose all the answers that apply:


• to decouple an abstraction from its implementation so that the two can vary independentl
• to translates an existing class interface into a compatible target interface
• to arrange object hierarchies such that the client code can access both the individual objects and
compositions in a uniform manner
• to improve the system overall performance

Check the answer of this question online at QuizOver.com:


Question: gang of four composite design pattern applicability

Flashcards:
http://www.quizover.com/flashcards/gang-of-four-composite-design-pattern-applicability?pdf=3044

Interactive Question:
http://www.quizover.com/question/gang-of-four-composite-design-pattern-applicability?pdf=3044

(29) Powered by QuizOver.com - http://www.quizover.com


QuizOver.com is the leading online quiz & exam creator
Copyright (c) 2009-2015 all rights reserved
4.1.24. Which design pattern is used in the Java AWT Abstract Window Toolkit?

Author: Yasser Ibrahim


Which design pattern is used in the Java AWT Abstract Window Toolkit?

Please choose only one answer:


• Adapter design pattern
• Composite design pattern
• Bridge design pattern
• Proxy design pattern

Check the answer of this question online at QuizOver.com:


Question: gang of four composite design pattern java usages

Flashcards:
http://www.quizover.com/flashcards/gang-of-four-composite-design-pattern-java-usages?pdf=3044

Interactive Question:
http://www.quizover.com/question/gang-of-four-composite-design-pattern-java-usages?pdf=3044

(30) Powered by QuizOver.com - http://www.quizover.com


QuizOver.com is the leading online quiz & exam creator
Copyright (c) 2009-2015 all rights reserved
4.1.25. What are the consequences of applying the GOF Bridge pattern?

Author: Yasser Ibrahim


What are the consequences of applying the GOF Bridge pattern?

Please choose all the answers that apply:


• it makes implementing the client code easier by interacting with a single uniform interface
• it decouples an abstraction from its implementation so that the two can vary independently
• it will decrease the system extesibility
• the client code can traverse tree structures of arbitrary depth recursively

Check the answer of this question online at QuizOver.com:


Question: java bridge method

Flashcards:
http://www.quizover.com/flashcards/java-bridge-method?pdf=3044

Interactive Question:
http://www.quizover.com/question/java-bridge-method?pdf=3044

(31) Powered by QuizOver.com - http://www.quizover.com


QuizOver.com is the leading online quiz & exam creator
Copyright (c) 2009-2015 all rights reserved
4.1.26. When would you use the GOF Bridge design pattern?

Author: Yasser Ibrahim


When would you use the GOF Bridge design pattern?

Please choose all the answers that apply:


• to implement lazy loading of expensive objects
• to improve system reliability and scalability
• to decouple an abstraction from its implementation so that the two can vary independently
• to hide the implementation details from the client code of your design

Check the answer of this question online at QuizOver.com:


Question: gang of four bridge design pattern applicability

Flashcards:
http://www.quizover.com/flashcards/gang-of-four-bridge-design-pattern-applicability?pdf=3044

Interactive Question:
http://www.quizover.com/question/gang-of-four-bridge-design-pattern-applicability?pdf=3044

(32) Powered by QuizOver.com - http://www.quizover.com


QuizOver.com is the leading online quiz & exam creator
Copyright (c) 2009-2015 all rights reserved
4.1.27. Which design pattern you would you use to assign more functionality...

Author: Yasser Ibrahim


Which design pattern you would you use to assign more functionality to an object without sub-classing it?

Please choose only one answer:


• Bridge design pattern
• Adapter design pattern
• Composite design pattern
• Decorator design pattern

Check the answer of this question online at QuizOver.com:


Question: decorator pattern example in java

Flashcards:
http://www.quizover.com/flashcards/decorator-pattern-example-in-java?pdf=3044

Interactive Question:
http://www.quizover.com/question/decorator-pattern-example-in-java?pdf=3044

(33) Powered by QuizOver.com - http://www.quizover.com


QuizOver.com is the leading online quiz & exam creator
Copyright (c) 2009-2015 all rights reserved
4.1.28. Which of the following are participants in the GOF Decorator design...

Author: Yasser Ibrahim


Which of the following are participants in the GOF Decorator design pattern?

Please choose all the answers that apply:


• Abstract Decorator
• Virtual Decorator
• Decorator
• Concrete Decorator
• Component

Check the answer of this question online at QuizOver.com:


Question: gang of four decorator design pattern participants

Flashcards:
http://www.quizover.com/flashcards/gang-of-four-decorator-design-pattern-participants?pdf=3044

Interactive Question:
http://www.quizover.com/question/gang-of-four-decorator-design-pattern-participants?pdf=3044

(34) Powered by QuizOver.com - http://www.quizover.com


QuizOver.com is the leading online quiz & exam creator
Copyright (c) 2009-2015 all rights reserved
4.1.29. What are the consequences of applying the GOF Decorator pattern?

Author: Yasser Ibrahim


What are the consequences of applying the GOF Decorator pattern?

Please choose all the answers that apply:


• it makes the client code easier by interacting with a single uniform interface
• the client code can traverse tree structures of arbitrary depth recursively
• it will will not alter the class inheritance hierarchy to accommodate for the additional functionality
• it allows to nest layers of decorators to add more functionality

Check the answer of this question online at QuizOver.com:


Question: gang of four decorator design pattern consequences

Flashcards:
http://www.quizover.com/flashcards/gang-of-four-decorator-design-pattern-consequences?pdf=3044

Interactive Question:
http://www.quizover.com/question/gang-of-four-decorator-design-pattern-consequences?pdf=3044

(35) Powered by QuizOver.com - http://www.quizover.com


QuizOver.com is the leading online quiz & exam creator
Copyright (c) 2009-2015 all rights reserved
4.1.30. When would you use the GOF Decorator design pattern?

Author: Yasser Ibrahim


When would you use the GOF Decorator design pattern?

Please choose all the answers that apply:


• to translates an existing class interface into a compatible target interface
• to assign more functionality to an object without sub-classing it
• to decouple an abstraction from its implementation so that the two can vary independently
• to nest layers of decorators to add more functionality

Check the answer of this question online at QuizOver.com:


Question: gang of four decorator design pattern applicability

Flashcards:
http://www.quizover.com/flashcards/gang-of-four-decorator-design-pattern-applicability?pdf=3044

Interactive Question:
http://www.quizover.com/question/gang-of-four-decorator-design-pattern-applicability?pdf=3044

(36) Powered by QuizOver.com - http://www.quizover.com


QuizOver.com is the leading online quiz & exam creator
Copyright (c) 2009-2015 all rights reserved
4.1.31. What are the consequences of applying the GOF Decorator pattern?

Author: Yasser Ibrahim


What are the consequences of applying the GOF Decorator pattern?

Please choose all the answers that apply:


• the client code can gradually add more functionality as it nests more layers of decorators
• it assigns more functionality to an object without sub-classing it
• it makes it harder to identify the the decorated and the decorator objects
• the client code can traverse tree structures of arbitrary depth recursively

Check the answer of this question online at QuizOver.com:


Question: gof decorator design pattern

Flashcards:
http://www.quizover.com/flashcards/gof-decorator-design-pattern?pdf=3044

Interactive Question:
http://www.quizover.com/question/gof-decorator-design-pattern?pdf=3044

(37) Powered by QuizOver.com - http://www.quizover.com


QuizOver.com is the leading online quiz & exam creator
Copyright (c) 2009-2015 all rights reserved
4.1.32. Which design pattern is used in the Java InputStream, OutputStream,...

Author: Yasser Ibrahim


Which design pattern is used in the Java InputStream, OutputStream, Reader, Writer hierarchies?

Please choose only one answer:


• Adapter design pattern
• Decorator design pattern
• Composite design pattern
• Bridge design pattern

Check the answer of this question online at QuizOver.com:


Question: gof decorator design pattern java usages

Flashcards:
http://www.quizover.com/flashcards/gof-decorator-design-pattern-java-usages?pdf=3044

Interactive Question:
http://www.quizover.com/question/gof-decorator-design-pattern-java-usages?pdf=3044

(38) Powered by QuizOver.com - http://www.quizover.com


QuizOver.com is the leading online quiz & exam creator
Copyright (c) 2009-2015 all rights reserved
4.1.33. You are building an online makeup website, which provides beside te...

Author: JavaChamp Team


You are building an online makeup website, which provides beside text articles, makeup tutorials as videos files.

Which pattern is recommended to use in such a website to deliver these media resources?

Please choose only one answer:


• value list handler
• virtual proxy
• intercepting filter
• composite view

Check the answer of this question online at QuizOver.com:


Question: what to use virtual proxy pattern?

Flashcards:
http://www.quizover.com/flashcards/what-to-use-virtual-proxy-pattern?pdf=3044

Interactive Question:
http://www.quizover.com/question/what-to-use-virtual-proxy-pattern?pdf=3044

(39) Powered by QuizOver.com - http://www.quizover.com


QuizOver.com is the leading online quiz & exam creator
Copyright (c) 2009-2015 all rights reserved

You might also like