ACtE08 · Chapter 8Mock Test 02🏛️ Past Licensure QuestionID: b14b731e
In object-oriented design, how many instances of a class can exist simultaneously when applying the Singleton design pattern?
In object-oriented design, how many instances of a class can exist simultaneously when applying the Singleton design pattern?
Multiple Choice Options
- A
zero
- B✓ Correct Option
one
- C
two
- D
three
Detailed Technical Solution & Explanation
The defining intent of the GoF Singleton design pattern is to ensure that a class has exactly one unique instance across the entire application runtime, providing a centralized global point of access.
Option Analysis:
•
Option A (zero): Occurs only prior to initial lazy instantiation.
•
Option B (one): Correct. The Singleton pattern strictly limits the class to exactly one instantiated object.
•
Option C (two): Violates the Singleton contract.
•
Option D (three): Violates the Singleton contract.
Reference: Mock Test 02NEC Licensure Syllabus