Class 2 Flashcards
(8 cards)
What is UML?
- A standardized, graphical “modeling language” for
communicating software req/design. - Allows implementation-independent specification of:
- user/system interactions (required behaviors)
- partitioning of responsibility (OO)
- integration with larger or existing systems
- data flow and dependency
- operation orderings (algorithms)
- concurrent operations
- UML is not “process”!
- it doesn’t tell you how to do things, only what you should do
Motivations for UML
- Why do we want UML?
- UML allows us to share high-level design ideas
- UML gives us a standard notation so that we both express
the same design the same way (….maybe….) - UML is unambiguous (…for some things…)
- Design is much more apparent from a UML diagram than
source code
– design patterns are easy to see in UML - UML is independent of the implementation language
– a UML design could be realized in Java, C++, Perl, etc….
Types of UML diagrams
There are different types of UML diagram, each with
slightly different syntax rules:
* use cases;
* activity diagrams;
* sequence diagrams;
* class diagrams;
* package diagrams;
* state diagrams;
* deployment diagrams;
UML basic syntax
Actors: a UML actor indicates an interface (point of
interaction) with the system.
* We use actors to group and name sets of system
interactions.
* Actors may be people, or other systems.
* An actor is NOT part of the system you are modeling.
An actor is something external that your system has to
deal with.
* Boxes: boxes are used variously throughout UML to
indicate discrete elements, groupings and containment.
UML basic syntax
- Arrows: arrows indicate all manner of things,
depending on which particular type of UML
diagram they’re in. - Usually, arrows indicate flow, dependency, association
or generalization. - Cardinality: applied to arrows, cardinalities
show relative numerical relationships between
elements in a model: - 1 to 1, 1 to many, etc.
- Constraints: allow notation of arbitrary constraints on
model elements. - to constrain the value of a class attribute
- Stereotypes: allow us to extend the semantics of UML
with English. - A stereotype is usually a word or short phrase that describes
what a diagram element does
UML basic syntax
- Constraints: allow notation of arbitrary constraints on
model elements. - to constrain the value of a class attribute
- Stereotypes: allow us to extend the semantics of UML
with English. - A stereotype is usually a word or short phrase that describes
what a diagram element does
UML diagrams: use cases
- A use case encodes a typical user interaction with the
system. In particular, it: - captures some user-visible function.
- achieves some concrete goal for the user.
- A complete set of use cases defines the requirements
for your system: - everything the user can see and would like to do.
- The granularity of your use cases determines the number
of them (for your system). A clear design depends on
showing the right level of detail. - A use case maps actors to functions. The actors need not
be people.
Activity diagram
A UML activity diagram helps to visualize a use
case at a more detailed level.
It is a behavioral diagram that illustrates the flow
of activities through a system.
UML activity diagrams can also be used to depict a
flow of events in a business process.