UML&OCL Modeling Languages


Classes' diagrams

Inheritance tells the compiler to copy code from one class (the parent "superclass") to another (the children subclass).


Inheritance

For instance, the instances of Group will have operations "add" and "move" due to inheritance.
As a remark, the code inside Group (e.g. in method "add") don't have access to x/y values due to private (-) visibility. This can be changed by changing this one to protected (#)


5 - 11