Software Construction: UML Part 1
Cards to learn UML
Cards to learn UML
Fichier Détails
Cartes-fiches | 26 |
---|---|
Langue | Deutsch |
Catégorie | Informatique |
Niveau | Université |
Crée / Actualisé | 29.12.2019 / 10.01.2020 |
Lien de web |
https://card2brain.ch/box/20191229_software_construction_uml_class_diagrams
|
Intégrer |
<iframe src="https://card2brain.ch/box/20191229_software_construction_uml_class_diagrams/embed" width="780" height="150" scrolling="no" frameborder="0"></iframe>
|
Créer ou copier des fichiers d'apprentissage
Avec un upgrade tu peux créer ou copier des fichiers d'apprentissage sans limite et utiliser de nombreuses fonctions supplémentaires.
Connecte-toi pour voir toutes les cartes.
Class Diagrams (Definition)
Visibility & Scope of Features
Association (Lines & Arrows)
An association is a structural relationship that represents objects can be connected or associated with another object inside the system (e.g. usage).
Usually binary (but may be ternary, etc.)
Optional name and direction
(unique) role names and multiplicities at end points
It is denoted by a solid line.
Dependency (Lines & Arrows)
Navigable / Directed association (Lines & Arrows)
Realization (Lines & Arrows)
Generalization (Lines & Arrows)
Generalization describes the inheritance relationship of the object-oriented world. It is a parent & child relationship.
Generalization is represented by an arrow with a hollow arrow head. The arrow head end represents the parent element and the other end represents the child element.
We also speak of a subclass (child) that specializes its superclass (parent).
Aggregation (Lines & Arrows)
Aggregation vs. Composition (Lines & Arrows)
Aggregation implies a relationship where the child can exist independently of the parent. Example: Class (parent) and Student (child). Delete the Class and the Students still exist.
Composition implies a relationship where the child cannot exist independent of the parent. Example: House (parent) and Room (child). Rooms don't exist separate to a House.
Multiplicity
- 0..1 : Zero or one entity
- 1 : Exacty one entity
- * : Any numbers of entities (0 possible)
- 1..* : One or more entities
- 1..n : One to n entities
The multiplicity of an association constrains how many entities one may be associated with.
Association (other) constraints
{ordered}
{xor}
{implicit} : specifies that the relationship is not manifest but, rather, is only conceptual.
{changeable}: Links between objects may be added, removed, and changed freely.
{addonly}: New links may be added from an object on the opposite end of the association.
{frozen}: A link, once added from an object on the opposite end of the association, may not be modified or deleted.
Qualified Associations
A qualified association has a qualifier value that is used to select an object (or objects) from a larger set of related objects, based upon the qualifier key.
Informally, in a software perspective, it suggests looking things up by a key, such as objects in a HashMap.
NB (NoBrainer?): Qualifiers are part of the association, not the class.
Class Diagrams Pros & Cons
Pros
- Useful to represent how types are defined and related
- They are useful to capture the essence of one or more design decisions
Cons
- Poor vehicle for capturing run-time property of the code
-
- 1 / 26
-