Bokep
- Viewed 118k times203edited Sep 25, 2011 at 8:31
It's not a matter of which is the best, but of when to use what.
In the 'normal' cases a simple question is enough to find out if we need inheritance or aggregation.
If The new class is more or less as the original class. Use inheritance. The new c...
class DogEat;Walk;Bark;Play;end;We now need a class 'Cat', that needs 'Eat', 'Walk', 'Purr', and 'Play'. So first try to extend it from a Dog.
class Cat is DogPurr;end;Looks, alright, but wait. This cat can Bark (Cat lovers will kill me for that). And a barking cat violates the principles of the u...
Content Under CC-BY-SA license oop - Inheritance vs. Aggregation - Stack Overflow
When to use association, aggregation, composition and inheritance?
Inheritance vs aggregation and "has-a" vs "is-a". - Stack Overflow
- Question & Answer
oop - What is the difference between association, …
May 20, 2009 · In their definitions, the distinction between an "aggregation" and a "composition" is based on the fact if it allows sharing a part between two or more wholes. They define "compositions" as having non-shareable …
oop - What is the difference between aggregation, composition …
oop - Explanation of the UML arrows - Stack Overflow
Apr 20, 2023 · The general classifier is at the arrow end of the connector. Attributes, associations, and operations are inherited by the specific classifier. Use the Inheritance tool to create a generalization between two classifiers. …
- People also ask
Aggregation vs Composition vs Association vs Direct Association
Composition, Inheritance, and Aggregation in JavaScript
Difference between Inheritance and Composition - Stack Overflow
C++ : Association, Aggregation and Composition - Stack Overflow
c# - Inheritance Vs Aggregation - Stack Overflow
c# - What is 'aggregation over inheritance'? - Stack Overflow
java - Inheritance and HAS-A relationship - Stack Overflow
java - Association vs. Aggregation - Stack Overflow
oop - Distinguishing between delegation, composition and …
Apache Maven: What is the difference between Inheritance, …
Prefer composition over inheritance? - Stack Overflow
maven - Module inheritance vs aggregation - Stack Overflow
uml - Difference between association and dependency? - Stack …
oop - What is the difference between Composition and …
What is the difference between composition and aggregation?
java - Maven inheritance and aggregation - Stack Overflow
java - Aggregation versus Composition - Stack Overflow
Related searches for difference between inheritance and aggregat…