COMPILER DESIGN

ADVANCED TOPICS IN COMPILER DESIGN

CODE GENERATION FOR OBJECT ORIENTED LANGUAGES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
A term that is used to describe the relationship between classes, where one class is a collection of other classes, yet the classes have their own lifecycle and exist outside of the container class
A
Aggregation
B
Association
C
Composition
D
Polymorphic
Explanation: 

Detailed explanation-1: -Explanation: Association relationship between classes is made using the objects of classes like we have a bank object denoting ABC bank and some objects of Employee class XYZ1, XYZ2 and so on. So, in this case, XYZ1 is an employee in ABC bank so there is a relationship between these two objects.

Detailed explanation-2: -In UML models, an aggregation relationship shows a classifier as a part of or subordinate to another classifier. An aggregation is a special type of association in which objects are assembled or configured together to create a more complex object.

Detailed explanation-3: -Association in Java defines the connection between two classes that are set up through their objects. Association manages one-to-one, one-to-many, and many-to-many relationships. In Java, the multiplicity between objects is defined by the Association.

Detailed explanation-4: -Association. An association represents a relationship between two classes: An association indicates that objects of one class have a relationship with objects of another class, in which this connection has a specifically defined meaning (for example, “is flown with”).

There is 1 question to complete.