Lecture 2-UML Flashcards
What does a use case describe?
It describes sequences of actions a system performs that yield an observable result of value to a particular actor.
What are 3 features of use cases?
-They capture functional requirements
-They are derived from the Vision Document
-They collect a number of(+) scenarios(normal and abnormal)
What are the 3 categories of UML diagrams?
1.Structural –>element of spec. irrespective of time :
-class
-component
-deployment
-object
-package
2. Behavioral
-activity
-state machine
-use case
3.Interaction–>emphasize object interaction:
-communication(collaboration)
-sequence
-Interaction overview
-Timing
What are the 3 applications of use case diagrams?
1.Determining requirements
2.Communicating with clients
3.Generating test cases
Why do we use class diagrams?
Gives an overview of a system by showing its classes and the relationships among them. –>They display what interacts but not what happens when they do interact
What are 3 characteristics of class diagrams?
-They are static
-They show attributes and operations of each class
-Good way to describe the overall architecture of system components.
What are the 5 characteristics of classes?
-A class represents a concept
-Encapsulates state –> attributes & behaviour–> operations
-Each attribute has a type
-Each operation has a signature
-Class name is the ONLY MANDATORY info
What are the 3 characteristics of instances?
-It represents a phenomenon
-Name of an instance is UNDERLINED & can contain the class of the instance
-Attributes represented with their values
What is the UML class notation?
A class is a rectangle divided intro 3 parts:
-class name
-class attributes
-Class operations
*IF ABSTRACT: IN ITALIC
What are the type of modifiers(4)?
-Private : -
-Public : +
-Protected : #
-Static : underlined
What are the 4 class relationships?
-Association(unary, binary)
-Aggregation(collection-member relationship)
-Composition(strong lifecycle dependency)
-Inheritance
What is an aggregation relationship?
-It’s an association with a collection-member relationship
-Hollow diamond on the collection side
-No sole ownership implied
What is a composition relationship?
-“If the engine is destroyed, so is the car”
-Filled diamond shaped arrowhead
What is the inheritance relationship?
-Superclass: has common attributes methods for all subclasses
-Subclasses : inherit the attributes and methods of the superclass
-Empty arrowhead
What are the 4 UML multiplicities ?
- 0..1 : zero or one instance
- 0..* or * : no limit
-1: exactly one instance - 1..*: at least one instance
What is a System Sequence Diagram(SSD)?
It shows the external actors that interact directly within the system, the system itself(black box), and the system events that the actors generate.
*Time proceeds downward
*Ordering of events should follow their order in the scenario
Why draw a system sequence diagram?
Because a software system reacts to 3 things:
1) external events from actors
2)timer events
3)faults or exceptions (often from external sources)
What does : imply in SSD?
An instance
When are SSDs usually created in UP?
In the elaboration phase
When to use SSD(2)?
-Drawn for 1 particular scenario
-To show the bahvior of several actors within a single use case
What is an activity diagram and what does it do(2) ?
-They show sequential and parallel activities in a process
-They visualize the flow of events in a use case
What does an activity diagram focus on vs not focus on?
-It shows the tasks that need to be done with what inputs and in what order.
-It does not show who is doing the task, unless we use swim lanes.
Where are activity diagrams usually applicable in UP?
Within the Business Modelling discipline
When to use activity diagrams(2)?
-They can be used for both control flow and data flow modelling.
-In complex use cases with many alternative flows
What is a UML state machine diagram and what does it do?
-It illustrates the interesting events and states of an object, and the behaviour of an object in reaction to an event.
-Used for complex page flows
When to use State Machine diagrams?
When we have state-dependent classes and state-dependent objects.
What is special about state machine in the UP?
-There is not one model in the UP called “state model”–> any element in any model (design model, business object model, …) may have a state machine.