Association means simply that two classes talk to each other. One calls methods in the other
Inheritance allows an inheriting class to get all the public fields and methods of the parent. It always proceeds from the more general, more abstract, to the more specific or concrete. The child class must be of the same kind as the parent.
An interface is a collection of method signatures. A class that implements an interface must provide a body for all the method signatures in the interface.
Composition is a relation where one class in totally contained in another class. If the container class is destroyed (goes out of scope) so does the contained class.
Aggregation is a relationship where one class is contained in the other, but the contained class persists even when the containing class is destroyed
No comments:
Post a Comment