What’s difference between Association, Aggregation and
Inheritance relationships?
Answer Posted / meenakshi sharma
Association- Association is used for establishing
relationship between classes. Association describes links
between(among) classes. For example, if a professor works
in a university then it can be represent as the assciation
relationship between professor and university class.
Aggregation-Aggregation is a concept that is used to
express "part-of" types of associations between
objects.Aggregation is seen as a relationship in which an
assembly class is related to component class. In this
component objects are not having seperate existence, they
depend on composite objects.
Inheritance-Inheritance is an object orientation concept
which allow reusability of design/code. Basic meaning of
inheritance is that if one class is already defined than
another class which also passes the property of existing
class can be defined and inherit the property of existing
class. For example, if a class named Student is defined and
another class for Post Graduate students is to be defined
then PG Student class can inherit the Student class.
| Is This Answer Correct ? | 13 Yes | 0 No |
Post New Answer View All Answers
What is datetime minvalue in c#?
What are the ways in which client can create object on server in cao model?
What is the difference between read and readline in c#?
What is iqueryable and ienumerable in c#?
Illustrate serialization?
Enlist the different types of classes in c#?
How to prevent the error while updating ui control from another thread?
If you want to write your own dot net language, what steps you will u take care?
Why do we need reflection in c#?
Why is aws serverless?
In which order the destructor is called for an inherited class?
What is xml comments in c#?
How do you type a null character?
What do constructors do in c#?
List down the differences between “dispose” and “finalize” methods in c#.