Creational Design Patterns in Modern C++ - Registry of Singletons - Part I

Creational Design Patterns in Modern C++ - Registry of Singletons - Part I

Assessment

Interactive Video

Information Technology (IT), Architecture

University

Hard

Created by

Quizizz Content

FREE Resource

The video tutorial discusses the violation of the dependency inversion principle and the need to refactor code to adhere to the open-closed principle. It introduces a Printer Provider class to manage Singleton instances, allowing for easier addition of new printer types without modifying existing code. The tutorial also covers the Multiton pattern, thread safety, and the differences between eager and lazy instantiation of Singletons.

Read more

3 questions

Show all answers

1.

OPEN ENDED QUESTION

3 mins • 1 pt

What changes are made to ensure that the printer provider class can register multiple Singleton instances?

Evaluate responses using AI:

OFF

2.

OPEN ENDED QUESTION

3 mins • 1 pt

How does the implementation of get printer ref differ from get printer PTR?

Evaluate responses using AI:

OFF

3.

OPEN ENDED QUESTION

3 mins • 1 pt

What modifications are necessary to make the printer provider class thread-safe?

Evaluate responses using AI:

OFF