Quote:
Originally Posted by namsu
I have only really used inheritance and composition in Java. Can someone provide me with an example on association. I want to try and make the program function the same way except by association. For inheritance I am obviously using the keyword extends and using the super keyword to call to the parent class. Thanks.
|
You have actually used
associations more often than inheritance or compostion. An association is usually described as a "uses" relationship, that is when one object uses (invokes a method on) another object.