Object-Oriented Programming (OOP)
Choose the correct description of Singleton pattern.
Difficulty: Hard
About this MCQ
This Hard Object-Oriented Programming (OOP) MCQ checks one syllabus fact.
The question is: “Choose the correct description of Singleton pattern.”
The accepted answer is B. A design pattern that restricts the instantiation of a class to a single shared object.. Choose the correct description of Singleton pattern is answered by A design pattern that restricts the instantiation of a class to a single shared object option B Option A The process by which objects communicate with one another by invoking each other's methods does not match the stem it is a near-miss used to catch incomplete recall of A design pattern that restricts the instantiation of a class to a single shared object Option C A mechanism where the method to be executed is determined at runtime rather than at compile time does not match the stem it is a near-miss used to catch incomplete recall of A design pattern that restricts the instantiation of a class to a single.
- A. The process by which objects communicate with one another by invoking each other's methods.
Why not A: “The process by which objects communicate with one another by invoking each other's methods.” is not correct. The accepted answer is B. A design pattern that restricts the instantiation of a class to a single shared object.. Choose the correct description of Singleton pattern is answered by A design pattern that restricts the instantiation of a class to a single shared object option B Option A The proc
- B. A design pattern that restricts the instantiation of a class to a single shared object. ✓
- C. A mechanism where the method to be executed is determined at runtime rather than at compile time.
Why not C: “A mechanism where the method to be executed is determined at runtime rather than at compile time.” is not correct. The accepted answer is B. A design pattern that restricts the instantiation of a class to a single shared object.. Choose the correct description of Singleton pattern is answered by A design pattern that restricts the instantiation of a class to a single shared object option B Option A The proc
- D. A keyword that controls the visibility and accessibility of a class's members, such as public or private.
Why not D: “A keyword that controls the visibility and accessibility of a class's members, such as public or private.” is not correct. The accepted answer is B. A design pattern that restricts the instantiation of a class to a single shared object.. Choose the correct description of Singleton pattern is answered by A design pattern that restricts the instantiation of a class to a single shared object option B Option A The proc
Correct answer
B. A design pattern that restricts the instantiation of a class to a single shared object.
Explanation
Choose the correct description of Singleton pattern is answered by A design pattern that restricts the instantiation of a class to a single shared object option B Option A The process by which objects communicate with one another by invoking each other's methods does not match the stem it is a near-miss used to catch incomplete recall of A design pattern that restricts the instantiation of a class to a single shared object Option C A mechanism where the method to be executed is determined at runtime rather than at compile time does not match the stem it is a near-miss used to catch incomplete recall of A design pattern that restricts the instantiation of a class to a single.
Source: Object-Oriented Programming (OOP) Official Reference Guide
Tags: computer science, oop, object-oriented programming, software design
Submitted by: MCQsHub Editorial
Related MCQs
- A design pattern that restricts the instantiation of a class to a single shared object. What is this concept c...
- What is the function or purpose of Message passing?
- Identify the correct concept described as: a variable defined in a class for which each object of that class m...
- The concept in which a keyword used in a subclass to refer to members or methods of its immediate parent class...
- Which of the following best describes Static binding?
- Identify the correct definition of Super keyword.