Erica Solum
Test por , creado hace más de 1 año

Final Software Engineering Test sobre Design Patterns, creado por Erica Solum el 15/03/2016.

655
10
0
Erica Solum
Creado por Erica Solum hace más de 8 años
Cerrar

Design Patterns

Pregunta 1 de 19

1

Adapter is:

Selecciona una de las siguientes respuestas posibles:

  • creational pattern which defines an interface for creating objects, but delegates the actual responsibility for selecting the class and instantiating the object to a subclass

  • structural pattern that lets you add responsibilities to an object dynamically

  • structural pattern that adapts a class with an incompatible interface to fit your needs

Explicación

Pregunta 2 de 19

1

Observer is:

Selecciona una de las siguientes respuestas posibles:

  • behavioral pattern that allows an object to notify other objects when it changes (without knowing what the other objects are)

  • behavioral pattern that lets subclasses redefine certain steps of an algorithm without changing the algorithm's structure.
    (Similar to Strategy but allows steps to be changed instead of whole implementation)

  • behavioral pattern that allows a class to use different variants of an algorithm

Explicación

Pregunta 3 de 19

1

Factory method is:

Selecciona una de las siguientes respuestas posibles:

  • creational pattern which defines an interface for creating objects, but delegates the actual responsibility for selecting the class and instantiating the object to a subclass

  • creational pattern which provides an interface for creating families of related(or dependent) objects without specifying their concrete classes

  • behavioral pattern that lets subclasses redefine certain steps of an algorithm without changing the algorithm's structure.
    (Similar to Strategy but allows steps to be changed instead of whole implementation)

Explicación

Pregunta 4 de 19

1

Abstract Factory is:

Selecciona una de las siguientes respuestas posibles:

  • creational pattern which provides an interface for creating families of related(or dependent) objects without specifying their concrete classes

  • structural pattern that lets you add responsibilities to an object dynamically

  • behavioral pattern that allows a class to use different variants of an algorithm

Explicación

Pregunta 5 de 19

1

Decorator is:

Selecciona una de las siguientes respuestas posibles:

  • structural pattern that lets you add responsibilities to an object dynamically

  • behavioral pattern which encapsulates a request as an object

  • structural pattern that adapts a class with an incompatible interface to fit your needs

Explicación

Pregunta 6 de 19

1

Command is:

Selecciona una de las siguientes respuestas posibles:

  • behavioral pattern which encapsulates a request as an object

  • behavioral pattern that allows a class to use different variants of an algorithm

  • behavioral pattern that allows an object to notify other objects when it changes (without knowing what the other objects are)

Explicación

Pregunta 7 de 19

1

Use case for abstract factory:

Selecciona una o más de las siguientes respuestas posibles:

  • system should be independent of product creation

  • want to configure with multiple families of products

  • want to ensure that a product family is used together

  • when an algorithm consists of varying and invariant parts that must be customized

  • a class can't anticipate the class of objects it must create

Explicación

Pregunta 8 de 19

1

Use cases for factory method:

Selecciona una o más de las siguientes respuestas posibles:

  • a class can't anticipate the class of objects it must create

  • a class wants its subclasses to specify the objects it create

  • you need to use several subclasses, but its impractical to adapt their interfaces by subclassing each one

  • many classes differ only in their behavior

  • want to configure with multiple families of products

Explicación

Pregunta 9 de 19

1

Use cases for decorator:

Selecciona una o más de las siguientes respuestas posibles:

  • add responsibilities to individual objects dynamically and transparently

  • when responsibilities for objects can be withdrawn

  • when extension of functionality by subclassing is impractical

  • parameterize objects by an action to perform

  • client needs different variants of an algorithm

  • system should be independent of product creation

Explicación

Pregunta 10 de 19

1

Use cases for command:

Selecciona una o más de las siguientes respuestas posibles:

  • parameterize objects by an action to perform

  • specify, queue, and execute requests at different times

  • structure a system around high-level operations built out of primitives

  • you want to create a reusable class that cooperates with unrelated classes that might not have compatible interfaces

  • client needs different variants of an algorithm

  • system should be independent of product creation

Explicación

Pregunta 11 de 19

1

Bridge pattern:

Selecciona una de las siguientes respuestas posibles:

  • Decouples an abstraction from an implementation so the two can vary independently

  • Provides a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface making the subsystem easier to use.

  • Provide a surrogate or placeholder for another object to control access to it

Explicación

Pregunta 12 de 19

1

Mediator is:

Selecciona una o más de las siguientes respuestas posibles:

  • Defining an object that encapsulates how a set of objects interact.

  • A way for controlling communication between classes or entities.

  • Use sharing to support large numbers of fine-grained objects efficiently

  • Compose objects into tree structures to represent part-whole hierarchies

Explicación

Pregunta 13 de 19

1

Chain of Responsibility is:

Selecciona una de las siguientes respuestas posibles:

  • Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request

  • Encapsulate a request as an object, thereby letting you parameterize clients with different requests, queue or log requests, and support undoable operations

  • Provide a way to access the elements of an aggregate object sequentially without exposing its underlying representation

  • Define an object that encapsulates how a set of objects interact

Explicación

Pregunta 14 de 19

1

Facade:

Selecciona una de las siguientes respuestas posibles:

  • Provides a unified interface to a set of interfaces in a subsystem

  • Converts the interface of a class into another interface clients expect

  • Attaches additional responsibilities to an object dynamically

  • Provides a surrogate or placeholder for another object to control access to it

Explicación

Pregunta 15 de 19

1

Flyweight:

Selecciona una de las siguientes respuestas posibles:

  • Uses sharing to support large numbers of fine-grained objects efficiently

  • Specifies the kinds of objects to create using a prototypical instance, and create new objects by copying this prototype

  • Defines the skeleton of an algorithm in an operation, deferring some steps to subclasses

  • Represents an operation to be performed on the elements of an object structure

Explicación

Pregunta 16 de 19

1

Proxy:

Selecciona una de las siguientes respuestas posibles:

  • Provides a surrogate or placeholder for another object to control access to it

  • Has a simulated object that mimics the behavior of a real object in controlled ways1

  • Specify the kinds of objects to create using a prototypical instance, and create new objects by copying this prototype

  • Define the skeleton of an algorithm in an operation, deferring some steps to subclasses

Explicación

Pregunta 17 de 19

1

Visitor:

Selecciona una de las siguientes respuestas posibles:

  • Lets you define a new operation without changing the classes of the elements on which it operates

  • Attach additional responsibilities to an object dynamically

  • Decouple an abstraction from an implementation so the two can vary independently

  • Define a family of algorithms, encapsulate each one, and make them interchangeable

Explicación

Pregunta 18 de 19

1

Model-View-ViewModel:

Selecciona una de las siguientes respuestas posibles:

  • Decouples the model from the view, uses data binding from the view to the middle layer, and allows UI/UX designers to work almost independently from application developers

  • Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically

  • Represent an operation to be performed on the elements of an object structure

Explicación

Pregunta 19 de 19

1

Data Access Object:

Selecciona una de las siguientes respuestas posibles:

  • Provides an abstract interface to some type of database or other persistence mechanism.

  • Defines a family of algorithms, encapsulate each one, and make them interchangeable

  • Compose objects into tree structures to represent part-whole hierarchies

Explicación