COMPILER DESIGN

ADVANCED TOPICS IN COMPILER DESIGN

CODE GENERATION FOR OBJECT ORIENTED LANGUAGES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
What is the term used to specify how attributes and behaviours’ of one object cannot affect another object
A
Encapsulation
B
Encampment
C
Encaged
D
Encasement
Explanation: 

Detailed explanation-1: -Inheritance is a mechanism that allows one class to gain the properties of another class, in the same way, that a child inherits some attributes from each of their parents.

Detailed explanation-2: -Attributes are the characteristics of the class that help to distinguish it from other classes. Behaviors are the tasks that an object performs. A person’s attributes, for example, include their age, name, and height, while their behaviors include the fact that a person can speak, run, walk, and eat.

Detailed explanation-3: -A Class is a description of a group of objects with common properties (attributes), behavior (operations), relationships, and semantics. A class is an abstraction.

Detailed explanation-4: -the three terms used to describe an object in C++ object oriented programming are identity, attributes and behavior.

There is 1 question to complete.