Skip to content

Object-Oriented Programming (OOP)

Select the correct name for: the practice of restricting direct access to an object's internal data to protect it from unintended interference.

Difficulty: Easy

About this MCQ

This Easy Object-Oriented Programming (OOP) MCQ checks one syllabus fact.

The question is: “Select the correct name for: the practice of restricting direct access to an object's internal data to protect it from unintended interference.”

The accepted answer is D. Data hiding. Select the correct name for the practice of restricting direct access to an object's internal data to protect it from unintended interference is answered by Data hiding option D Option A Instance variable does not match the stem it is a near-miss used to catch incomplete recall of Data hiding Option B Static member does not match the stem it is a near-miss used to catch incomplete recall of Data hiding Remaining alternatives Composition over inheritance fall outside the same rule and should be eliminated once Data hiding is identified Object-Oriented Programming OOP questions of this type reward precise definitions rather than approximate associations Object-Oriented Programming OOP recall of this distinction is a regular item in FPSC PPSC NTS and.

Correct answer

D. Data hiding

Explanation

Select the correct name for the practice of restricting direct access to an object's internal data to protect it from unintended interference is answered by Data hiding option D Option A Instance variable does not match the stem it is a near-miss used to catch incomplete recall of Data hiding Option B Static member does not match the stem it is a near-miss used to catch incomplete recall of Data hiding Remaining alternatives Composition over inheritance fall outside the same rule and should be eliminated once Data hiding is identified Object-Oriented Programming OOP questions of this type reward precise definitions rather than approximate associations Object-Oriented Programming OOP recall of this distinction is a regular item in FPSC PPSC NTS and.

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