Tehnici de Proiectare Software

MULTIPLE CHOICE 1. Ce ºablon de proiectare reprezintã diagrama

urmãtoare:
AstractFactory CreateProductA() CreateProductB() Client

AbstractProductA

ConcreteFactory1 CreateProductA() CreateProductB()

ConcreteFactory2 CreateProductA() CreateProductB()

ProductA2

ProductA1

AbstractProductB

ProductB2

ProductB1

a. b. c. d.

Abstract Factory Singleton Builder Prototype

2. Ce ºablon de proiectare reprezintã diagrama urmãtoare:
Product Creator FactoryMethod() AnOperation() ConcreteProduct product= FactoryMethod()

ConcreteCreator FactoryMethod() return new ConcreteProduct

a. b. c. d.

Prototype FactoryMethod Builder Singleton

1

3.

Ce ºablon de proiectare reprezintã diagrama urmãtoare:
Singleton Static Instance() SingletonOperation() getSingletonData() static uniqueInstance singletonData return uniqueInstance

a. b. c. d.

FactoryMethod Builder Singleton Prototype

4. Ce ºablon de proiectare reprezintã diagrama urmãtoare:
Director Construct() Builder BuildPart()

for all objects in structure{ builder->BuildPart() }

ConcreteBuilder BuildPart() getResult Product

a. b. c. d.

Prototype FactoryMethod Singleton Builder

2

5. Ce ºablon de proiectare reprezintã diagrama urmãtoare:
Client Operation() Prototype Clone()

p=prototype->Clone()

ConcretePrototype1 Clone()

ConcretePrototype2 Clone()

return copy of self

return copy of self

a. b. c. d. 6.

Prototype FactoryMethod Singleton Builder Ce ºablon de proiectare reprezintã diagrama urmãtoare:
Client Target Request() implements p=prototype->Clone() Adapter Request() SpecificRequest() Adaptee SpecificRequest()

a. b. c. d.

Composite Adapter Decorator Bridge

3

7. Ce ºablon de proiectare reprezintã diagrama urmãtoare:
Abstraction Operation() imp->OperationImpl() Implementor OperationImpl()

RefinedAbstraction

ConcretImplementatorA OperationImpl ()

ConcretImplementatorB OperationImpl ()

a. b. c. d.

Adapter Composite Bridge Decorator

8. Ce ºablon de proiectare reprezintã diagrama urmãtoare:
Client Component Operation() AddComponent() Remove(Component) GetChild(int)

Leaf Operation()

Component

children
Operation() AddComponent() Remove(Component) GetChild(int)

forall g in children{ g.Operation() }

a. b. c. d.

Composite Adapter Bridge Decorator

4

9. Ce ºablon de proiectare reprezintã diagrama urmãtoare:
Component Operation()

ConcreteComponent Operation()

Decorator Operation() component->operation

ConcreteDecoratorA Operation() addedState

ConcreteDecoratorB Operation() AddedBehavior()

Decorator->Operation(); AddedBehavior()

a. b. c. d.

Bridge Decorator Composite Adapter

5

Sign up to vote on this title
UsefulNot useful