SE - Lec 3-1
SE - Lec 3-1
SE - Lec 3-1
Lecture 3
2
• Essence of OO design
• define the solution as a collection of software objects (allocating
responsibilities to objects)
6
Plane
visualization of
domain concept
domain concept tailNumber
The UML uses mostly graphical notations to express the OO analysis and
design of software projects.
UML Diagrams
• UML defines 13 basic diagram types, divided
into two general sets:
• Structural Modeling Diagrams
• Structure diagrams define the static architecture of a model
1. Package diagrams are used to divide the model into logical
containers or 'packages' and describe the interactions
between them at a high level
2. Class or Structural diagrams define the basic building
blocks of a model: the types, classes and general materials
that are used to construct a full mode.
3. Object diagrams show how instances of structural elements
are related and used at run-time.
4. Composite Structure diagrams provide a means of layering
an element's structure and focusing on inner detail,
construction and relationships
13
UML Diagrams
5. Component diagrams are used to model higher level or more
complex structures, usually built up from one or more classes,
and providing a well defined interface
6. Deployment diagrams show the physical disposition of significant
artifacts within a real-world setting.
Profile
• Profile diagrams are those created in a «profile» Package, to
extend UML elements, connectors and components.
15
UML Diagrams
• Behavioral Modeling Diagrams
Behavior diagrams capture the varieties of
interaction and instantaneous state within a model
as it 'executes' over time.
1. Use Case diagrams are used to model user/system interactions.
They define behavior, requirements and constraints in the form of
scripts or scenarios
2. Activity diagrams have a wide number of uses, from defining
basic program flow, to capturing the decision points and actions
within any generalized process
3. State Machine diagrams are essential to understanding the
instant to instant condition or "run state" of a model when it
executes
16
UML Diagrams
4. Communication diagrams show the network and sequence of
messages or communications between objects at run-time during
a collaboration instance
5. Sequence diagrams are closely related to Communication
diagrams and show the sequence of messages passed between
objects using a vertical timeline
6. Timing diagrams fuse Sequence and State diagrams to provide a
view of an object's state over time and messages which modify
that state
Interaction Overview Diagrams
• Interaction Overview diagrams visualize the cooperation
between Interaction diagrams (Timing, Sequence,
Communication and other Interaction Overview diagrams) to
illustrate a control flow serving an encompassing purpose.
18
(Ben Stein)
19
system
Use-Case Diagrams
• A use-case diagram is a set of use cases
• A use case is a model of the interaction between
External users of a software product (actors) and
The software product itself
More precisely, an actor is a user playing a specific role
• Use Case
Use Case Name: Play a Dice Game
Actor: Player
Description: Player requests to roll the dice. System
presents results: If the dice face value totals seven,
player wins; otherwise, player loses.
22
Kinds of Actors
• Primary actor
• has user goals fulfilled through using services of the SuD
(single user device)
• why identify? To find user goals, which drive use cases
• Supporting/Secondary actor
• provides a service (for example, information) to the SuD
• why identify? To clarify external interfaces and protocols
25
Borrow Employee
Client
Order Title
Fine Remittance
Supervisor
30
• Generalization: relationship between one general use case and a special use case
(used for defining special alternatives) Represented by a line with a triangular arrow
head toward the parent use case.
Use-Case Diagrams
Include: a dotted line labeled <<include>> beginning at base
use case and ending with an arrows pointing to the include use
case. The include relationship occurs when a chunk of
behavior is similar across more than one use case. Use
“include” in stead of copying the description of that behavior.
<<include>>
<<extend>>
≪include≫: Functional Decomposition
• Problem:
• A function in the original problem statement is too complex to be
solvable immediately
• Solution:
• Describe the function as the aggregation of a set of simpler
functions. The associated use case is decomposed into smaller
use cases
CreateDocument
≪include≫
≪include≫
≪include≫
OCR (Optical
Scan Check
Character
Recognition )
≪include≫: Reuse of Existing Functionality
• Problem:
• There are already existing functions. How can we reuse them?
• Solution:
• The include association from Use Case A to Use Case B indicates
that an instance of A performs all the behavior described in B (“A
delegates to B”)
• Example:
• The use case “ViewMap” describes behavior that can be used by
the use case “OpenIncident” (“ViewMap” is factored out)
• Note: The base use case cannot exist alone. It is always called with
the supplier use case
≪include≫
OpenIncident
ViewMap
Base Use ≪include≫
Case Supplier
AllocateResources Use Case
When to Use Include Relationship?
ReportEmergency
≪ extend≫ Association for Use Cases
• The idea is to create an extending or addition use
CheckPassword
Parent ValidateUser
Child
Case
CheckFingerprint Use Case
40
Process Sale
Cashier
«include» «include» «actor»
Accounting
«include» System
Handle Returns
Manage Users
...
Other Requirements
• Important to know that use cases are not suitable
for all requirements
• Because, not all requirements are determined by
user-system dialogue
• Supplementary Specification (SS) captures non-
functional requirements (URPS+)
• Glossary, Vision, Business Rule docs can also
contain requirements
42
• Brief Format
43