Association -
it tells the relationship between two objects like
one to many
many to many
many to one
Composition
car and its parts
if the car is destroyed all its part is part is destroyed
eg-The final object in a class which is instantiated in the class itself part of relation
it is denoted by filled diamond in UML
Aggregation
student and college
Student can go and join in college
eg-The list of object or object which is passed in the function has relation
it is denoted by empty diamond in UML
virtual function
In object-oriented programming, a virtual function or virtual method is a function or method whose behavior can be overridden within an inheriting class by a function with the same signature. This concept is an important part of the polymorphism portion of object-oriented programming (OOP)
in java all function by default are virtual if their modifier is not Final.
Runtime polymorphism is not acheived by data mnebers
it tells the relationship between two objects like
one to many
many to many
many to one
Composition
car and its parts
if the car is destroyed all its part is part is destroyed
eg-The final object in a class which is instantiated in the class itself part of relation
it is denoted by filled diamond in UML
Aggregation
student and college
Student can go and join in college
eg-The list of object or object which is passed in the function has relation
it is denoted by empty diamond in UML
virtual function
In object-oriented programming, a virtual function or virtual method is a function or method whose behavior can be overridden within an inheriting class by a function with the same signature. This concept is an important part of the polymorphism portion of object-oriented programming (OOP)
in java all function by default are virtual if their modifier is not Final.
Runtime polymorphism is not acheived by data mnebers
Comments
Post a Comment