I am finding it difficult to model polymorphism and instances in UML.
For example if i have an abstract, parent or base class called "Bird", i would imagine that you could say that "duck" is one form of polymorphism but it could also be an instance.
Maybe, i'm confusing where one starts and ends. Are there visual examples of these?
It is simple enough.
If one concrete class Cage has reference to abstract class Bird, and concrete classes Woodpecker and Canary are derived from the last, this is polymorphism. You'll have to choose what bird really will sit in the cage, for abstract class has no instances. The same for Interface.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With