Composition is one of the fundamental concepts in object-oriented programming. It describes a class that references one or more objects of other classes in instance variables. This allows you to model a has-a association between objects. You can find such relationships quite regularly in the real world. A car, for example, has an engine and modern coffee machines often have ...
The post OOP Concepts for Beginners: What is Composition? appeared first on Stackify.
from Stackify http://ift.tt/2mDFl63
No comments:
Post a Comment