Search Header Logo

DPAT test2

Authored by 황현우 황현우

Other

University

Used 1+ times

DPAT test2
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the primary intent of the Adapter design pattern?

a) To convert the interface of a class into another interface that clients expect
b) To ensure that a class has only one instance and provide a global point of access to it
c) To define an interface for creating objects without specifying their concrete classes
d) To attach additional responsibilities to an object dynamically

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the motivation behind the use of the Singleton design pattern?

a) To allow an object to alter its behavior when its internal state changes
b) To ensure that a class has only one instance and provide a global point of access to it
c) To define a family of algorithms, encapsulate each one, and make them interchangeable
d) To capture and externalize an object's internal state without violating its encapsulation

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is not a key term associated with the Factory Method design pattern?

a) Target
b) Deferred instantiation
c) Parallel class hierarchy
d) Factory of factories

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is not a key element of the Abstract Factory design pattern?

a) Providing an interface for creating families of related dependent objects
b) Specifying the concrete classes to be instantiated
c) Allowing the system to be independent of how its products are created, composed, and represented
d) Promoting loose coupling by keeping objects from referring to each other explicitly

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the main purpose of the Decorator design pattern?

a) To provide a unified interface to a set of interfaces in a subsystem
b) To attach additional responsibilities to an object dynamically
c) To use sharing to support a large number of fine-grained objects efficiently
d) To define an object that encapsulates how a set of objects interact

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which design pattern addresses the problem of communication between classes in a program?

a) Mediator
b) Memento
c) State
d) Strategy

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the main intent of the Memento design pattern?

a) To allow an object to alter its behavior when its internal state changes
b) To capture and externalize an object's internal state without violating its encapsulation
c) To define a family of algorithms, encapsulate each one, and make them interchangeable
d) To implement an algorithm in a method, deferring the definition of some steps to subclasses

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?