Skip to content

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.

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

More Object-Oriented Programming (OOP) MCQs