Start learning 50% faster. Sign in now
Encapsulation is a fundamental principle of OOP that involves bundling data (attributes) and methods (functions) that operate on the data into a single unit or class. It also restricts direct access to some components of the object, typically by declaring them private or protected. Access is then controlled through public methods known as getters and setters. Encapsulation ensures security and prevents unauthorized or accidental modification of data. For instance, in a class BankAccount , the balance attribute might be private, and only specific methods like deposit() or withdraw() are accessible to modify it. This safeguards the integrity of the data and prevents incorrect usage. Why Other Options Are Wrong Option A : "Polymorphism" Polymorphism deals with methods behaving differently for different object types, not with restricting access. Option C : "Inheritance" Inheritance allows a child class to use the properties and methods of a parent class but does not involve controlling access to data. Option D : "Abstraction" Abstraction hides complexity by exposing only essential features. However, encapsulation is specifically about access control at the data and method level. Option E : "Message Passing" Message passing refers to the communication between objects in OOP but does not control access to internal object components.
Which of the following statements are correct with respect to the International Banking Units (IBUs) operating in IFSC?
(i) Lender of last resort...
Why is global transfer pricing becoming increasingly important for multinationals?
An insurance claim of _______ has been transferred to the insured farmers of Rajasthan, Uttar Pradesh, Himachal Pradesh, Chhattisgarh, Uttarakhand and ...
Mortgage is defined under:
What was the total amount mobilized by the SME sector through IPOs in FY 2023-24, as reported in the SEBI Annual Report 2023-24?
According to the IFSCA Circular on Compliance Deadline Extension for Bullion Members (August 2024), what is the new compliance deadline for meeting the ...
What is the minimum limit of withdrawal that should be allowed by banks in the Basic Savings Bank Deposit Accounts?
According to the IFSCA Circular on Fees for BATF Service Providers (July 2024), what is the annual fee for BATF service providers with between 500 and 1...
According to the IFSCA Circular on Debt Securities Listing (September 2024), under which sections of the International Financial Services Centres Author...
Under the IFSCA Listing Regulations 2024, how long must promoters’ and controlling shareholders’ pre-issue shareholding be locked up after an IPO?