
- •What is the uml?
- •2. What are ways of using uml
- •Describe uml diagrams.
- •4. How to fit the uml into development process?
- •Notes and comments, constraint rules, keywords on uml diagrams: definitions, description, examples.
- •6. Main elements of class diagram: definitions, description, examples.
- •7. Attributes and operations on class diagram: definitions,
- •Visibility name (parameter-list) : return-type {property-string}
- •8. Relationships between classes: definitions, description, examples.
- •9. Interfaces and abstract classes on class diagram:
- •10. Main elements of sequence diagram: definitions, description, examples.
- •11. Creating and deleting participants, synchronous and asynchronous calls on sequence diagram: definitions, description, examples.
- •12. Loops and conditionals on sequence diagram: definitions, description, examples.
- •13. Main elements of object diagram: definitions, description, examples.
- •14. Main elements of package diagram: definitions, description, examples.
- •15. How to show aspects on package diagram: definition, description, example.
- •16. Main elements of deployment diagram: definitions, description, examples.
- •17. Main elements of use case diagram: definitions, description, examples.
- •18. Levels of use cases on use case diagram: definitions, description, examples.
- •19. Relationships between use cases: definitions, description, examples.
- •20. Main elements of state machine diagram: definitions, description, examples.
- •21. Internal activities, activity states, superstates, concurrent states: definitions, description, examples.
- •22. Main elements of activity diagram: definitions, des, examples.
- •23. Decomposing an action on activity diagram: definition, description, example.
- •24. Partitions, expansion regions, flow final, join specifications: definitions, description, examples
- •25. Main elements of communication diagram: definitions, description, examples.
- •26. Composite structures: definition, description, example.
- •27. Main elements of component diagram: definitions, description, examples.
- •28. Collaborations: definition, description, example.
- •29. Main elements of interaction overview diagram: definitions, description, examples.
- •30. Main elements of timing diagram: definitions, description, examples.
- •Uml: Exam questions
- •What is the uml?
7. Attributes and operations on class diagram: definitions,
The attribute notation describes a property as a line of text within the class box itself. The full form of an attribute is:
visibility name: type multiplicity = default {property-string}
An example of this is:
- name: String [1] = "Untitled" {readOnly}
Only the name is necessary.
· This visibility marker indicates whether the attribute is public (+) or private (-);
· The name of the attribute—how the class refers to the attribute—roughly corresponds to the name of a field in a programming language.
· The type of the attribute indicates a restriction on what kind of object may be placed in the attribute. We can think of this as the type of a field in a programming language.
· The default value is the value for a newly created object if the attribute isn't specified during creation.
· The {property-string} allows us to indicate additional properties for the attribute. In the example, I used {readOnly} to indicate that clients may not modify the property. If this is missing, we can usually assume that the attribute is modifiable. I'll describe other property strings as we go.
Operations are the actions that a class knows to carry out. Operations most obviously correspond to the methods on a class. Normally, we don't show those operations that simply manipulate properties, because they can usually be inferred.
The full UML syntax for operations is:
Visibility name (parameter-list) : return-type {property-string}
· This visibility marker is public (+) or private (-);
· The name is a string.
· The parameter-list is the list of parameters for the operation.
· The return-type is the type of the returned value, if there is one.
· The property-string indicates property values that apply to the given operation.
An example operation on account might be:
+ balanceOn (date: Date) : Money
Visibility allows to constrain the usage of a named element, either in namespaces or in access to the element. It is used with classes, packages, generalizations, element import, package import. UML has the following types of visibility:
public (+)
package (~)
protected (#)
private (-)
8. Relationships between classes: definitions, description, examples.
Classes are interrelated to each other in specific ways. In particular, relationships in class diagrams include different types of logical connections.
Association
is a broad term that encompasses just about any logical connection or
relationship between classes. For example, passenger and airline may
be linked as above.
Directed
Association
refers to a directional relationship represented by a line with an
arrowhead. The arrowhead depicts a container-contained directional
flow.
Reflexive
Association
occurs when a class may have multiple functions or responsibilities.
For example, a staff working in an airport may be a pilot, aviation
engineer, a ticket dispatcher, a guard, or a maintenance crew member.
If the maintenance crew member is managed by the aviation engineer
there could be a managed by relationship in two instances of the same
class.
Aggregation
Folder could contain many files, while each File has exactly one Folder parent. If Folder is deleted, all contained Files are deleted as well.
Multiplicity
is
the active logical association when the cardinality of a class in
relation to another is being depicted. For example, one fleet may
include multiple airplanes, while one commercial airplane may contain
zero to many passengers. The notation 0..* in the diagram means “zero
to many”.Multiplicity
is a definition of an inclusive interval of non-negative integers to
specify the allowable number of instances of described element.
Hospital has 1 or more Departments, and each Department belongs to exactly one Hospital. If Hospital is closed, so are all of its Departments.
Checking, Savings, and Credit Accounts are generalized by Account. Realization denotes the implementation of the functionality defined in one class by another class. To show the relationship in UML, a broken line with an unfilled solid arrowhead is drawn from the class that defines the functionality to the class that implements the function. In the example, the printing preferences that are set using the printer setup interface are being implemented by the printer.