Skip to content

Object-Oriented Programming (OOP)

What is the function or purpose of Encapsulation?

Difficulty: Medium

About this MCQ

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

The question is: “What is the function or purpose of Encapsulation?”

The accepted answer is C. An OOP principle that bundles data and methods together while restricting direct access to some components.. Encapsulation refers to an OOP principle that bundles data and methods together while restricting direct access to some components.

Correct answer

C. An OOP principle that bundles data and methods together while restricting direct access to some components.

Explanation

Encapsulation refers to an OOP principle that bundles data and methods together while restricting direct access to some components.

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