On Tuesday, Simon was following another tutorial by Derek Banas, this time on UML Class Diagrams, and thought it would be fun to draw the diagrams in a new app he downloaded: ClickCharts. He tried to understand the relations between classes, abstraction, dependence, inheritance and constraints. The examples used illustrate design patterns in Java.
Principle of inheritance:
UML stands for Unified Modeling Language, it is a general-purpose, developmental, modeling language in the field of software engineering, that is intended to provide a standard way to visualize the design of a system. A diagram is a partial graphic representation of a system’s model. There are two types of diagrams in UML 2: static (or structural) and dynamic (or behavioral). Simon was studying class diagrams, which belong to static (structural) diagrams.
In software engineering a class diagram is a type of static structure diagram that describes the structure of a system by showing the system’s classes, their attributes, operations (or methods), and the relationships among objects.
The class diagram is the main building block of object-oriented modelling. It is used both for general conceptual modelling of the systematics of the application, and for detailed modelling translating the models into programming code. Class diagrams can also be used for data modeling. The classes in a class diagram represent both the main elements, interactions in the application, and the classes to be programmed.
Here Simon turned the Factory Pattern into actual code: