COMPILER DESIGN

ADVANCED TOPICS IN COMPILER DESIGN

CODE GENERATION FOR OBJECT ORIENTED LANGUAGES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Abstraction in OOP means the following ____ ?
A
Emphasis on details so the developer gets a better understanding
B
A developer hides all but the relevant data about an object
C
Either A or B
D
None of the above
Explanation: 

Detailed explanation-1: -In object-oriented programming, abstraction is one of three central principles (along with encapsulation and inheritance). Through the process of abstraction, a programmer hides all but the relevant data about an object in order to reduce complexity and increase efficiency.

Detailed explanation-2: -Abstraction is a process of extracting important information without involving the complete detail of the system. On the other hand, data hiding is a process of wrapping the data in a single unit, i.e., to achieve data encapsulation.

Detailed explanation-3: -Encapsulation allows you to hide specific information and control access to the object’s internal state.

Detailed explanation-4: -What is abstraction in programming? Abstraction occurs when a programmer hides any irrelevant data about an object or an instantiated class to reduce complexity and help users interact with a program more efficiently.

There is 1 question to complete.