COMPILER DESIGN

ADVANCED TOPICS IN COMPILER DESIGN

CODE GENERATION FOR OBJECT ORIENTED LANGUAGES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Programs using the concepts of class, inheritance, encapsulation and polymorphism
A
Low-level
B
Object oriented
C
Imperative
D
Declarative
Explanation: 

Detailed explanation-1: -There are 4 major principles that make an language Object Oriented. These are Encapsulation, Data Abstraction, Polymorphism and Inheritance. These are also called as four pillars of Object Oriented Programming.

Detailed explanation-2: -Containers are just one example of encapsulation in coding where data and methods are bundled together into a single package. A key benefits to hiding information about attributes and methods using encapsulation in programming is that it prevents other developers from writing scripts or APIs that use your code.

Detailed explanation-3: -An excellent example of Polymorphism in Object-oriented programing is a cursor behavior. A cursor may take different forms like an arrow, a line, cross, or other shapes depending on the behavior of the user or the program mode.

There is 1 question to complete.