UML class diagram: Difference between revisions
Jump to navigation
Jump to search
m (using an external editor) |
m (using an external editor) |
||
Line 6: | Line 6: | ||
== Architecture == | == Architecture == | ||
Class diagrams are made with quite a complex "language". | Class diagrams are made with quite a complex "language". They describe what interacts between classes. | ||
; Classes | |||
* Classes are represented with boxes | * Classes are represented with boxes | ||
* Represented by a rectangle with one, two or three "fields": classname, properties and | * Represented by: a rectangle with one, two or three "fields": classname, properties and operations | ||
;Association | ;Association | ||
* A relationship between instances of the two classes | * A relationship between instances of the two classes | ||
* Represented by: a solid line with an arrow | * Represented by: a solid line, or if directional with an arrow directed from the source class to the target class. | ||
;Aggregation | ;Aggregation | ||
Line 60: | Line 59: | ||
; More | ; More | ||
* There is more (sorry)... | * There is more (sorry)... | ||
== Examples == | == Examples == | ||
Line 77: | Line 74: | ||
== References == | == References == | ||
* IMS Learning Design Information Model, Version 1.0 Final Specification, [http://www.imsglobal.org/learningdesign/ldv1p0/imsld_infov1p0.html HTML], retrieved 16: | * IMS Learning Design Information Model, Version 1.0 Final Specification, [http://www.imsglobal.org/learningdesign/ldv1p0/imsld_infov1p0.html HTML], retrieved 16:09, 5 June 2007 (MEST). | ||
* Randy Miller, [http://bdn.borland.com/article/0,1410,31863,00.html Practical UML: A Hands-On Introduction for Developers], Borland Developer network. (Short and excellent general UML tutorial). | * Randy Miller, [http://bdn.borland.com/article/0,1410,31863,00.html Practical UML: A Hands-On Introduction for Developers], Borland Developer network. (Short and excellent general UML tutorial). | ||
* Donald Bell, [http://www-128.ibm.com/developerworks/rational/library/769.html UML basics: An introduction to the Unified Modeling Language], IBM Developper Works / Rational Rose. (IBM has a lot of UML and use case tutorials, needs some searching skills) | * Donald Bell, [http://www-128.ibm.com/developerworks/rational/library/769.html UML basics: An introduction to the Unified Modeling Language], IBM Developper Works / Rational Rose. (IBM has a lot of UML and use case tutorials, needs some searching skills) |
Revision as of 15:09, 5 June 2007
Definition
UML Class diagrams are one kind of official diagram types of the Unified modeling language (UML)
Architecture
Class diagrams are made with quite a complex "language". They describe what interacts between classes.
- Classes
- Classes are represented with boxes
- Represented by: a rectangle with one, two or three "fields": classname, properties and operations
- Association
- A relationship between instances of the two classes
- Represented by: a solid line, or if directional with an arrow directed from the source class to the target class.
- Aggregation
- A part-of relationship
- Represented by: a solid line, with an emtpy lozange at aggregation end and arror at member end
- Example: a learning object is part of an environment
- Generalization
- A is-a relationship
- Represented by: A solid line with a triangular arrow from specialized class to class
- Example: Learner is a role
- Composition
- Like aggregation but you can add more constraints.
- An instance of a class can be potentially a component of several classes, but can only be owned by one.
- Represented by: a solid line, with an filled lozange at aggregation end and arror at member end
- Multiplicity
- of an association end is the number of possible instances of the class associated with a single instance of the other end.
- Represented on both ends by the following syntax
Multiplicities | Explanation The notation n . . m indicates n to m instances. |
---|---|
0..1 | zero or one instance. |
0..* or * | no limit on the number of instances (including none). |
1 | exactly one instance |
1..* | at least one instance |
- More
- There is more (sorry)...
Examples
IMS Learning Design
Here is the official UML Diagram that summarizes the IMS Learning Design] educational modeling language:
Here is an annotated version:
References
- IMS Learning Design Information Model, Version 1.0 Final Specification, HTML, retrieved 16:09, 5 June 2007 (MEST).
- Randy Miller, Practical UML: A Hands-On Introduction for Developers, Borland Developer network. (Short and excellent general UML tutorial).
- Donald Bell, UML basics: An introduction to the Unified Modeling Language, IBM Developper Works / Rational Rose. (IBM has a lot of UML and use case tutorials, needs some searching skills)