Start learning →
Home › Olympiad (Class 11) › Computer Science › Programming Languages › A class keeps its data and methods together and …

A class keeps its data and methods together and hides the inner workings. This is:

AExtrapolation
BEncapsulation
CEnumeration
DEqualisation
Answer & Solution
Correct answer: B. Encapsulation
1. Attributes and behaviours stay bundled with the object. 2. Internal details are hidden from outside code. 3. That principle is encapsulation. _Source: OpenStax Introduction to Computer Science, Chapter 7, High-Level Programming Languages._
Practise this question with Quill — Olympiad (Class 11) →
Related questions