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