Consider the following sentence: “A square is a polygon”. From an analysis of the sentence, identify the relations between the two classes Square and Polygon that can be inferred from the sentence.
a. Inheritance
b. Association
c. Aggregation
d. Composition
Answers
Answered by
0
a may be a is right ans ....
Answered by
1
Considering the following sentence: "A square is a polygon". From the sentence analysis, a) Inheritance defines the relationship between Square and Polygon of the two classes.
This is because the square has all the characteristics of the polygon and inherits the class of the polygon.
Hence the association between the two classes' polygon and square is defined using inheritance. It is a way to add methods from parent class.
Similar questions