design pattern bits

  • Upload
    jyothi

  • View
    219

  • Download
    0

Embed Size (px)

Citation preview

  • 7/29/2019 design pattern bits

    1/3

    1. The following is the application object in MVC [ A ]

    (A)Model (B) View (C) Controller (D) Interface2. The following pattern captures techniques for supporting access and traversal over object

    structures [ C ](A)Bridge (B) Strategy (C) Iterator (D) Command

    3. The following defines the way the user interface reacts to user input [ C ](A) Model (B) View (C) Controller (D) Interface

    4. The run-time association of a request to an object and one of its operations is called [ B ]

    (A) Static binding (B) Dynamic binding (C) Polymorphism (D) Inheritance

    5. Encapsulating an algorithm in an object is the intent of following pattern [ B ]

    (A) Single ton (B) Strategy (C) Composite (D) Builder

    6. A common way to represent hierarchically structured information is through a technique

    called [ B ]

    (A)Integration (B) Recursive composition (C) Differentiation (D) Aggregation7. The following is also known as wrapper [ B ]

    (A) Bridge (B) Adapter (C) Decorator (D) Proxy

    8. The following pattern defines a structural for sharing objects [ B ]

    Composite (B) Flyweight (C) Proxy (D) Decorator

    9. The purpose for Singleton Design pattern is [ A ](A) Creational (B) Structural (C) Behavioral (D) Implemental

    10. Menu item can store a __________ object that encapsulates a request. [ D ]

    (A)composition (B) window (C)product (D) command11. Factory Method is also known as VIRTUAL CONSTRUCTOR12. ADAPTER makes two existing interfaces work together as opposed to defining an entirely

    new one.13. A PROTECTED PROXY might be implemented exactly like decorator.

    14. DECORATORdesign pattern is used to provide additional responsibilities to an object

    dynamically15. The COMPISITE pattern describes how to build class hierarchy made up of classes16. In PROXYpattern, the subject defines the key functionality.17. The OBSERVERpattern defines and maintains a dependency between objects.

    18. FAADE FACTORY pattern is used when layering the subsystems.

    19. ADAPTERpattern makes things work before they are designed.

    20. COMMAND is used to allow multiple windowing platforms.

  • 7/29/2019 design pattern bits

    2/3

    1. Total how many design patterns are listed in the catalog of design patterns [ A]

    a) 23 b) 22 c) 21 d) 24

    2. Design patterns used in __________ development environment [ B]

    a) Procedure oriented b) Object oriented c) Both a & b d) None

    3. Below is a creational pattern [ C]a) Adapter b) Bridge c) Builder d) None

    4. Below is a structural patterns [ C ]a) Fly weight b) Proxy c) Both a & b d) None

    5. Composite pattern is a ________ pattern. [ A]

    a) Structural b) Creational c) Behavioral d) None

    6. Creational patterns concern the process of ________ creation. [ B ]

    a) Class b) Object c) Method d) All

    7. Structural patterns deals with the composition of __________ [ C ]

    a) Objects b) Classes c) a or b d) None

    8. The structural class patterns use _________ to compose classes. [ B ]

    a) Aggregation b) Inheritance c) Both a & b d) None

    9. Design patterns solve ___________ problems. [ B ]

    a) Coding b) Design c) Analysis d) All

    10. Singleton pattern is a ____________ pattern. [ A ]

    a) Creational b) Structural c) Behavioral d) None

    11. Each design pattern has 4 essential elements.

    12. MVC means MODEL VIEW CONTROLLER

    13. Abstract factory is a CREATIONAL pattern.14. Faade is a STRUCTURALpatterns.

    15. Introducing a mediator object between peers is done by MEDIATORpattern.

    16. TEMPLATE METHOD is an abstract definition of are algorithm.

    17. PROXY acts as a convenient surrogate or place.18. FAADE shows how to make a single object represent an entire subsystem.

    19. Based on scope, the design patterns are classified as CLASS and OBJECT scope.

    20. Based on the purpose of usage the design patterns classified as CREATINAL,BEHAVIORAL

    and STRUCTURALpatterns.

  • 7/29/2019 design pattern bits

    3/3

    1. The________is a handle we can use to describe a design problem, itssolutions, and

    consequences in a word. [ A]A) Pattern name B) Design name C) Problem D) Solution

    2. __________defines the way the user interface reacts to user input. [ B ]

    A) Model B) Controller C) View D) Container

    3. __________ is to illustrate sequences of requests and collaborations between objects. [ B ]

    A) Behavioral diagrams B) Interaction diagramsC) Activity diagrams D) State Diagram

    4. Convert the interface of a class into another interface clients expect, called [ C]

    A) Bridge B) Builder C) Adapter D) Abstract factory

    5. _____ provides a flexible alternative to subclassing for extending functionality. [ A]

    A) Decorators B) Composite C) Faade D) Command

    6. _______ is an abstractclass for objects that encapsulate window system-dependent code. [B ]A) MacWindowImp B) WindowImp C) PMWindowImp D) XWindowImp

    7. ________class that declares an interface for creating each basic kind of widget. [ A]A) Abstract WidgetFactory B) MotifWidgetFactory C) PMWidgetFactory D)

    WidgetFactory

    8. ____ uses only interfaces declared by AbstractFactory and AbstractProduct classes [ C]A) ConcreteFactory B) AbstractProduct C) Client D) ConcreteProducts

    9._______patterns are concerned with how classes and objects arecomposed to form larger

    structures [ B ]

    A) Creational Patterns B) Structural patterns C) Behavioral patterns D) Design Patterns

    10. Adapter also known as________ [ B ]

    A) Kit B) Wrapper C) Surrogate D) Handler

    11. VIEW is its screen presentation.12. A STRATEGY is an object that represents an algorithm.

    13. The TEMPLATE lends a uniform structure to the information, making design patterns

    easier to learn, compare, and use.14. Composition of objects into tree structures to represent part-whole relationship is called as

    COMPOSITE.

    15. FAADE defines a higher-level interface that makes the subsystem easier to use.

    16. UNION functionality creates an interface that incorporates thecapabilities ofallexistingsystems.

    17. The CREATIONAL patterns show how to make this design more flexible, not

    necessarilysmaller.18. Abstract factory is also known as KIT.

    19.PROXY can act as a local representative for an object inaremote address space.

    20. FLYWEIGHTpattern focuses on sharing for space efficiency.