0% found this document useful (0 votes)
78 views131 pages

Chapter 5

This document provides an overview of software design and the Unified Modeling Language (UML). It discusses what software design is, its main parts, and UML diagrams including activity diagrams. Key points covered include that software design maps requirements to an architecture, has system and detailed design parts, and UML is a graphical language used for software design consisting of structural and behavioral diagrams. UML activity diagrams specifically show the flow of steps in a process or behavior. Examples of online shopping, order processing, and document management activity diagrams are also included.

Uploaded by

Elif Karaatlı
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
78 views131 pages

Chapter 5

This document provides an overview of software design and the Unified Modeling Language (UML). It discusses what software design is, its main parts, and UML diagrams including activity diagrams. Key points covered include that software design maps requirements to an architecture, has system and detailed design parts, and UML is a graphical language used for software design consisting of structural and behavioral diagrams. UML activity diagrams specifically show the flow of steps in a process or behavior. Examples of online shopping, order processing, and document management activity diagrams are also included.

Uploaded by

Elif Karaatlı
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 131

SEN2022 SOFTWARE ENGINEERING

ANALYSIS AND DESIGN

CHAPTER 5: SOFTWARE DESIGN

Prepared by Prof. Dr. M. Alper TUNGA


SDLC
WHAT IS SOFTWARE DESIGN?

√ Software design is a representation or model of the


software to be built.
− It is a set of documents containing text and diagrams to
serve as the base on which an application can be fully
programmed.
√ It is the first step in moving from problem domain to
solution domain.
− Starting with what is needed, design takes towards how to
satisfy the needs.

3 of 131
SOFTWARE DESIGN

√ Software design starts with the requirement document


delivered by the requirements analysis phase and maps
the requirements into an architecture.
− The architecture defines the components, their interfaces
and behaviors.
• Details on programming languages and environments,
machines, packages, application architecture, memory size,
platform, algorithms, data structures, global type definitions,
interfaces, data types, constraints are established.

4 of 131
SOFTWARE DESIGN

√ Software design has two main parts:


− System Design (Architectural Design - Top Level Design):
• Focussed on the dialogue between the target system and
the users, devices, and other systems with which it
interacts.
◊ An outline about the functionality of every module
◊ Interface relationship and dependencies between modules
◊ Database tables identified along with their key elements
◊ Complete architecture diagrams along with technology details

5 of 131
SOFTWARE DESIGN

√ Software design has two main parts: (cont.)


− Detailed Design:
• Identifies the internal logic of all major system components
◊ Data types, data structures, constraints and algorithmic
design of each of the modules is specified. Once the design is
complete, most of the major decisions about the system have
been made.

6 of 131
UML DIAGRAMS

√ UML stands for Unified Modeling Language.


√ UML is a design language that is often used to develop
and build computer applications.
√ UML consists of a family of graphical notations that
assists in describing and designing software systems.
√ UML is mainly employed in the systems developed
using an object-oriented style.
√ UML is independent of implementation language.

7 of 131
UML DIAGRAMS

√ UML has undergone several phases of evolution.


− UML 1.0 and UML 2.0 are two different versions of UML.
• UML 1.0 is based on the Industry standard for object
oriented modeling.
• UML 2.0 has been an industry standard focusing on the
model-driven application integration.
− UML 2.0 is capable to provide better semantics or
definitions.

8 of 131
UML DIAGRAMS

√ The current version of the Unified Modeling Language is


UML 2.5.
− released in June 2015 [UML 2.5 Specification].
− UML specification is updated and managed by the Object
Management Group, OMG UML.

9 of 131
UML DIAGRAMS

10 of 131
UML DIAGRAMS

√ Structural diagrams show different objects in a system.


− Class, Component, Deployment, Object, Package, Profile,
Composite Structure.
√ Behavioral diagrams show what should happen in a
system.
− They describe how the objects interact with each other to
create a functioning system.
− Use Case, Activity, Sequence, State Machine,
Communication, Interaction Overview, Timing.

11 of 131
UML ACTIVITY DIAGRAM

√ Activity diagram is a UML behavior diagram which


shows flow of control or object flow with emphasis on
the sequence and conditions of the flow.
√ Activity diagram is a UML behavior diagram that shows
the flow of a business process, the steps of a use case,
or the logic of an object behavior (method).
√ Activity is a parameterized behavior represented as
coordinated flow of actions.

12 of 131
UML ACTIVITY DIAGRAM

13 of 131
UML ACTIVITY DIAGRAM

√ Basic Symbols and Notations:


− Action is a named element which represents a single
atomic step within activity, that is not further decomposed
within the activity.
− An action is notated as a round-cornered rectangle.
− Name or description of the action is placed inside of the
rectangle.
− Name of the action is usually action verb.

14 of 131
UML ACTIVITY DIAGRAM

√ Basic Symbols and Notations:


− Accept event action is action that waits for a specific event
to occur.
• This action handles asynchronous messages, including
asynchronous calls.
• notated as a concave pentagon.

15 of 131
UML ACTIVITY DIAGRAM

√ Basic Symbols and Notations: (cont.)


− An activity partition is activity group for actions that have
some common characteristic.
• Partitions often correspond to organizational units or
business actors in a business model.

Horizontal swimlane Vertical swimlane

16 of 131
UML ACTIVITY DIAGRAM

√ Basic Symbols and Notations: (cont.)


− Control node is an activity node used to coordinate the flows
between other nodes.
− A control node may be one of the following nodes:
• initial node
• flow final node
• activity final node
• decision node
• merge node
• fork node
• join node

17 of 131
UML ACTIVITY DIAGRAM

√ Basic Symbols and Notations: (cont.)


− Control node (cont.)
• Initial node is a control node at which flow starts when the
activity is invoked.
• Flow final node is a control final node that terminates a flow.
◊ It destroys all tokens that arrive at it but has no effect on other
flows in the activity.
• Activity final node is a control final node that stops all flows in
an activity.
◊ An activity may have more than one activity final node.
◊ The first one reached stops all flows in the activity.

18 of 131
UML ACTIVITY DIAGRAM

√ Basic Symbols and Notations: (cont.)


− Control node (cont.)
• Decision node is a control node that accepts tokens on one
or two incoming edges and selects one outgoing edge from
one or more outgoing flows.
◊ supports conditionals in activities.

19 of 131
UML ACTIVITY DIAGRAM

√ Basic Symbols and Notations: (cont.)


− Control node (cont.)
• Merge node is a control node that brings together multiple
incoming alternate flows to accept single outgoing flow.

20 of 131
UML ACTIVITY DIAGRAM

√ Basic Symbols and Notations: (cont.)


− Control node (cont.)
• Fork node is a control node that has one incoming edge and
multiple outgoing edges and is used to split incoming flow into
multiple concurrent flows.
◊ supports parallelism in activities.

• Join node is a control node that has multiple incoming edges


and one outgoing edge and is used to synchronize incoming
concurrent flows.

21 of 131
UML ACTIVITY DIAGRAM

√ Basic Symbols and Notations: (cont.)


− Activity Edge is an abstract class for the directed
connections along which tokens or data objects flow
between activity nodes.
• notated by an open arrowhead line connecting two nodes.

− Object flow edge is an activity edge used to show data


flow of object between action nodes.

22 of 131
UML ACTIVITY DIAGRAM

√ Example (Online Shopping): Online customer can


browse or search items, view specific item, add it to
shopping cart, view and update shopping cart, checkout.
User can view shopping cart at any time. Checkout is
assumed to include user registration and login.
− This example does not use partitions, most of the actions
are assumed to be fulfilled by online customer.

23 of 131
UML ACTIVITY DIAGRAM

24 of 131
UML ACTIVITY DIAGRAM

√ Example (Process Order): Requested order is input


parameter of the activity. After order is accepted and all
required information is filled in, payment is accepted and
order is shipped. Note, that this business flow allows
order shipment before invoice is sent or payment is
confirmed.
− This example does not use partitions, so it is not clear
who is responsible for fulfilling each specific action.

25 of 131
UML ACTIVITY DIAGRAM

26 of 131
UML ACTIVITY DIAGRAM

√ Example (Document Management Process): A


document goes through different state or stages - it is
created, reviewed, updated, approved, and at some
point archived.
− Different roles participating in this process are Author,
Reviewer, Approver, and Owner.
− These roles are represented on the diagram by partitions
rendered as horizontal "swimlanes".

27 of 131
UML ACTIVITY DIAGRAM

28 of 131
UML ACTIVITY DIAGRAM

√ Example (Manual Activation of Trial Product): After using the trial product
for some time customer decides to activate product by requesting a
permanent, full product license. Order Manager will have to create a new
activation key for the product while the customer could create and deliver
C2V file ("computer fingerprint"). Once both the new product key and the
C2V file become available to the customer service, it could activate product,
generate V2C file and deliver it back to the customer. The customer applies
license received and thus activates installed trial product to become a full
product. The product could be protected from copying to other computers or
virtual machines by the HASP SL license and protection key.
− Three activity partitions are shown on the diagram as vertical swimlanes and
represent actors participating in the activity - Order Management, Customer
Service, and Customer.

29 of 131
UML ACTIVITY DIAGRAM

30 of 131
UML ACTIVITY DIAGRAM

31 of 131
UML ACTIVITY DIAGRAM
√ Example (Single Sign-On (SSO)): To interact with partner companies Google uses single sign-
on based on OASIS SAML 2.0 protocol. Google acts as service provider with services such as
Gmail or Start Pages. Partner companies act as identity providers and control user names,
passwords, and other information used to identify, authenticate and authorize users for web
applications that Google hosts. Each partner provides Google with the URL of its SSO service
as well as the public key that Google will use to verify SAML responses. When a user attempts
to use some hosted Google application, such as Gmail, Google generates a SAML
authentication request and sends redirect request back to the user's browser. Redirect points to
the specific identity provider. SAML authentication request contains the encoded URL of the
Google application that the user is trying to reach. The partner identity provider authenticates
the user by either asking for valid login credentials or by checking for its own valid
authentication cookies. The partner generates a SAML response and digitally signs it. The
response is forwarded to Google's Assertion Consumer Service (ACS). Google's ACS verifies
the SAML response using the partner's public key. If the response is valid and user identity was
confirmed by identity provider, ACS redirects the user to the destination URL. Otherwise user
will see error message.

32 of 131
UML ACTIVITY DIAGRAM

33 of 131
UML ACTIVITY DIAGRAM

34 of 131
UML SEQUENCE DIAGRAM

√ Sequence diagram is an interaction diagram, which


focuses on the message interchange between a number
of lifelines.
− A UML behavioral diagram
√ Sequence diagram describes an interaction by focusing
on the sequence of messages that are exchanged,
along with their corresponding occurrence specifications
on the lifelines.

35 of 131
UML SEQUENCE DIAGRAM

36 of 131
UML SEQUENCE DIAGRAM

√ Basic Symbols and Notations:


− Lifeline is a named element which represents an
individual participant in the interaction.
− A lifeline is shown using a symbol that consists of a
rectangle forming its “head” followed by either a vertical or
a dashed line that represents the lifetime of the
participant.

37 of 131
UML SEQUENCE DIAGRAM

√ Basic Symbols and Notations: (cont.)


− Execution (full name - execution specification, informally
called activation) is interaction fragment which represents
a period in the participant's lifetime when it is
• executing a unit of behavior or action within the lifeline,
• sending a signal to another participant,
• waiting for a reply message from another participant.

38 of 131
UML SEQUENCE DIAGRAM

√ Basic Symbols and Notations: (cont.)


− Message is a named element that defines one specific
kind of communication between lifelines of an interaction.
− A message specifies not only the kind of communication,
but also the sender and the receiver.
Sending a request and waiting for a response Sending a request and not waiting for a response

39 of 131
UML SEQUENCE DIAGRAM

√ Basic Symbols and Notations: (cont.)


− A combined fragment defines a combination of interaction fragments.
− A combined fragment is defined by an interaction operator and
corresponding interaction operands.
• Interaction operator could be one of:
◊ alt - alternatives ◊ seq - weak sequencing
◊ opt - option ◊ critical - critical region
◊ loop - iteration ◊ ignore - ignore
◊ break - break ◊ consider - consider
◊ par - parallel ◊ assert - assertion
◊ strict - strict sequencing ◊ neg - negative
• Interaction constraint is called a guard.

40 of 131
UML SEQUENCE DIAGRAM

√ Basic Symbols and Notations: (cont.)


− Combined fragment – Interaction Operators
• Alternatives: The interaction operator alt means that the
combined fragment represents a choice or alternatives of
behavior.

• Option: The interaction operator opt means that the combined


fragment represents a choice of behavior where either the
operand happens or nothing happens.

41 of 131
UML SEQUENCE DIAGRAM

√ Basic Symbols and Notations: (cont.)


− Combined fragment – Interaction Operators (cont.)
• Iteration: Loop operand will be repeated a number of times.

Infinite loop Loop executed 10 times Loop is executed at least 5 at most


10 times. If guard condition
becomes false, loop is terminated

42 of 131
UML SEQUENCE DIAGRAM

√ Basic Symbols and Notations: (cont.)


− Combined fragment – Interaction Operators (cont.)
• Break: The interaction operator break represents a breaking
scenario that is performed instead of the remainder of the
enclosing interaction fragment.

43 of 131
UML SEQUENCE DIAGRAM

√ Basic Symbols and Notations: (cont.)


− Combined fragment – Interaction Operators (cont.)
• Parallel: The interaction operator par defines potentially
parallel execution of behaviors of the operands of the
combined fragment.

44 of 131
UML SEQUENCE DIAGRAM

√ Basic Symbols and Notations: (cont.)


− Interaction use is an interaction fragment which allows to
use (or call) another interaction.
• Large and complex sequence diagrams could be simplified
with interaction uses.
• The interaction use is shown as a combined fragment with
operator ref.

45 of 131
UML SEQUENCE DIAGRAM

√ Basic Symbols and Notations: (cont.)


− Destruction occurrence is a message occurrence which
represents the destruction of the instance described by
the lifeline.

46 of 131
UML SEQUENCE DIAGRAM

√ Example (Online Bookshop): Online customer can


search book catalog, view description of a selected
book, add book to shopping cart, do checkout.

47 of 131
UML SEQUENCE DIAGRAM

48 of 131
UML SEQUENCE DIAGRAM

√ Example (Login): The system checks the number of


unsuccessful attempts of the user while logging into the
system. If the number of unsuccessful attempts is more
than three, the system terminates the process.
Otherwise, the customer can keep on processing bank
transactions.

49 of 131
UML SEQUENCE DIAGRAM

50 of 131
UML SEQUENCE DIAGRAM

√ Example (Withdrawal): Customer withdraws money


from ATM.

51 of 131
UML SEQUENCE DIAGRAM

52 of 131
UML SEQUENCE DIAGRAM
√ Example: Facebook (FB) user could be authenticated in a web application to allow access
to his/her FB resources. Instead of using the FB user credentials to access protected
resources, the web application obtains an access token. Web application should be
registered by FB to have an application ID (client_id) and secret (client_secret). When
request to some protected FB resources is received, web browser ("user agent") is
redirected to FB's authorization server with application ID and the URL the user should be
redirected back to after the authorization process. User receives back Request for
Permission form. If the user authorizes the application to get his/her data, FB authorization
server redirects back to the URI that was specified before together with authorization code
("verification string"). The authorization code can be exchanged by web application for an
OAuth access token. If web application obtains the access token for a FB user, it can
perform authorized requests on behalf of that FB user by including the access token in the
FB Graph API requests. If the user did not authorize web application, FB issues redirect
request to the URI specified before, and adds the error_reason parameter to notify the web
application that authorization request was denied.

53 of 131
UML SEQUENCE DIAGRAM

54 of 131
UML STATE MACHINE DIAGRAM

√ State machine diagram is a UML behavior diagram


which shows discrete behavior of a part of designed
system through finite state transitions.
√ State machine diagram shows the different states of an
entity.
√ State machine diagram can also show how an entity
responds to various events by changing from one state
to another.

55 of 131
UML STATE MACHINE DIAGRAM

√ Two kinds of state machines defined in UML 2.4 are


− behavioral state machine
• is a specialization of behavior and is used to specify
discrete behavior of a part of designed system through finite
state transitions.
− protocol state machine
• is a specialization of behavioral state machine and is used
to express usage protocol or lifecycle of a classifier.

56 of 131
UML STATE MACHINE DIAGRAM

√ Water can exist in several states - liquid, vapor, solid, and plasma.
√ Several transitions are possible from one state to another.
− For example, freezing is phase change from liquid state to ice.
− Condensation is phase change from vapor state to liquid.
− Water vapor could turn directly into frost through deposition.

57 of 131
UML STATE MACHINE DIAGRAM

√ Basic Symbols and Notations: (cont.)


− Vertex is named element which is an abstraction of a
node in a state machine graph.
• In general, it can be the source or destination of any
number of transitions.
• Subclasses of vertex are:
◊ State
◊ Pseudostate

58 of 131
UML STATE MACHINE DIAGRAM

√ Basic Symbols and Notations: (cont.)


− State is a vertex which models a situation during which
some invariant condition holds.
• The invariant may represent a static situation such as an
object waiting for some external event to occur.
• Kinds of states:
◊ simple state is a state that does not have substates
◊ composite state is a state that has substates

59 of 131
UML STATE MACHINE DIAGRAM

√ Basic Symbols and Notations: (cont.)


− State notation:

60 of 131
UML STATE MACHINE DIAGRAM

√ Basic Symbols and Notations: (cont.)


− Region is an orthogonal part of either a composite state or
a state machine.
− Region contains states and transitions.
− The example represents
two sets of concurrent
substates by using
two regions.

61 of 131
UML STATE MACHINE DIAGRAM

√ Basic Symbols and Notations: (cont.)


− A pseudostate is an abstract vertex that encompasses
different types of transient vertices in the state machine
graph.
− Pseudostates are typically used to connect multiple
transitions into more complex state transitions paths.

62 of 131
UML STATE MACHINE DIAGRAM

√ Basic Symbols and Notations: (cont.)


− Pseudostate (cont.)
• An initial pseudostate represents a default vertex that is the
source for a single transition to the default state of a
composite state.
• Final state is a special kind of state signifying that the
enclosing region is completed.

63 of 131
UML STATE MACHINE DIAGRAM

√ Basic Symbols and Notations: (cont.)


− Pseudostate (cont.)
• Fork pseudostate vertices serve to split an incoming
transition into two or more transitions
• Join pseudostate merges several transitions

64 of 131
UML STATE MACHINE DIAGRAM

√ Basic Symbols and Notations: (cont.)


− Pseudostate (cont.)
• Shallow history pseudostate allows the state machine to re-
enter the last substate that was active prior to leaving the
composite state.

65 of 131
UML STATE MACHINE DIAGRAM

√ Example (Bank Automated Teller Machine (ATM)):


ATM is initially turned off. After the power is turned on, ATM
performs startup action and enters Self Test state. If the test fails,
ATM goes into Out of Service state, otherwise there is triggerless
transition to the Idle state. In this state ATM waits for customer
interaction. The ATM state changes from Idle to Serving Customer
when the customer inserts banking or credit card in the ATM's
card reader. On entering the Serving Customer state, the entry
action readCard is performed. Note, that transition from Serving
Customer state back to the Idle state could be triggered by cancel
event as the customer could cancel transaction at any time.

66 of 131
UML STATE MACHINE DIAGRAM

√ Example (Bank Automated Teller Machine (ATM)): (cont.)


Serving Customer state is a composite state with sequential
substates Customer Authentication, Selecting Transaction
and Transaction. Customer Authentication and Transaction
are composite states by themselves which is shown with
hidden decomposition indicator icon. Serving Customer state
has triggerless transition back to the Idle state after
transaction is finished. The state also has exit action
ejectCard which releases customer's card on leaving the
state, no matter what caused the transition out of the state.

67 of 131
UML STATE MACHINE DIAGRAM

68 of 131
UML STATE MACHINE DIAGRAM

√ Example (Oven):
Consider the operations using oven to cook.
You set the power and time at first. Then, open the door,
put the tray inside and close the door.

69 of 131
UML STATE MACHINE DIAGRAM

70 of 131
UML STATE MACHINE DIAGRAM

√ Example (Heater/cooler):
− Idle state receives Too Hot event
− Idle state receives Too Cool event
− Cooling/Startup state receives Compressor Running event
− Cooling/Ready state receives Fan Running event
− Cooling/Running state receives OK event
− Cooling/Running state receives Failure event
− Failure state receives Failure Cleared event
− Heating state receives OK event
− Heating state receives Failure event

71 of 131
UML STATE MACHINE DIAGRAM

72 of 131
UML CLASS DIAGRAM

√ A class diagram, which is a UML structure diagram, is the main


building block of any object-oriented solution.
√ A class diagram shows the classes in a system, attributes, and
operations of each class and the relationship between each class.
√ A class is a classifier which describes a set of objects that share
the same features, constraints, semantics (meaning).
√ A class has three parts in a class diagram.
− Name at the top,
− Attributes in the middle,
− Operations or methods at the bottom.

73 of 131
UML CLASS DIAGRAM

74 of 131
UML COMPONENT DIAGRAM

√ A component diagram is a UML structure diagram displays


the structural relationship of components of a software
system.
√ A component diagram shows components and
dependencies between them.
− Each component provides an interface for other components
to interact with it.
√ A component diagram is used to visualize how a system's
pieces interact and what relationships they have among
them.

75 of 131
UML COMPONENT DIAGRAM

√ Component-based software engineering (CBSE), also


called components-based development (CBD), is a
branch of software engineering that emphasizes the
separation of concerns with respect to the wide-ranging
functionality available throughout a given software
system.
√ Component diagram is a tool in component-based
software engineering.
− Especially used in designing service-oriented architectures
(SOA).

76 of 131
UML COMPONENT DIAGRAM

77 of 131
UML COMPONENT DIAGRAM

√ WebStore subsystem contains three components related to online shopping -


Search Engine, Shopping Cart, and Authentication.
− Search Engine component allows to search or browse items by exposing provided
interface Product Search and uses required interface Search Inventory provided by
Inventory component.
− Shopping Cart component uses Manage Orders interface provided by Orders
component during checkout.
− Authentication component allows customers to create account, login, or logout and
binds customer to some account.
√ Accounting subsystem provides two interfaces - Manage Orders and Manage
Customers.
− Delegation connectors link these external contracts of the subsystem to the realization
of the contracts by Orders and Customers components.
√ Warehouses subsystem provides two interfaces Search Inventory and Manage
Inventory used by other subsystems and wired through dependencies.

78 of 131
UML COMPONENT DIAGRAM

√ Basic Symbols and Notations:


− Component
• A component is a logical unit block of the system, a slightly
higher abstraction than classes.
• A component is a class representing a modular part of a
system with encapsulated content.
• A component has its behavior defined in terms of provided
interfaces and required interfaces potentially exposed via
ports.

79 of 131
UML COMPONENT DIAGRAM

√ Basic Symbols and Notations: (cont.)


− Interface
• a protocol for discrete objects to communicate with each other.
• Provided interface is shown with a complete circle and
represents an interface that the component provides.
◊ a component produces information used by the required
interface of another component.
• Required Interface is shown with a half circle and represents
an interface that the component requires.
◊ a component requires information in order to perform its proper
function.

80 of 131
UML COMPONENT DIAGRAM

√ Basic Symbols and Notations: (cont.)


− Interface (cont.)
• Order requires item code from Product
• Product provides item code to Order

81 of 131
UML COMPONENT DIAGRAM

√ Basic Symbols and Notations: (cont.)


− Port
• A port specifies an interaction point through which a
classifier can communicate with its environment or other
classifiers.
◊ Example: Customers component provides Account interface
to Orders component.

82 of 131
UML COMPONENT DIAGRAM

√ Basic Symbols and Notations: (cont.)


− Connector
• Connector is feature which specifies a link that enables
communication between two or more instances playing
some roles within a structured classifier.
• Connector linking components could be either:
◊ delegation connector, or
◊ assembly connector.

83 of 131
UML COMPONENT DIAGRAM

√ Basic Symbols and Notations: (cont.)


− Connector (cont.)

• Assembly connector
◊ a connector between two or more components on
components that defines that one or more components
provide the services that other components use.
• Delegation connector
◊ a connector that links the external contract of a component to
the realization of that behavior.

84 of 131
UML COMPONENT DIAGRAM

√ Basic Symbols and Notations: (cont.)


− Dependency
• Dependency is a directed relationship which is used to show
that some UML element or a set of elements requires, needs
or depends on other model elements for specification or
implementation.
• Required interface specifies services that a classifier needs
in order to perform its function and fulfill its own obligations
to its clients.
◊ It is specified by a usage dependency between the classifier
and the corresponding interface.

85 of 131
UML COMPONENT DIAGRAM

√ Basic Symbols and Notations: (cont.)


− Dependency (cont.)
• Example: EmployeeProvider is a component which provides services
to access an employee database. Suppose there is an instance
running in the USA and one instance running in Europe. There is also
a report generator component, which only has one instance, which
reads information from both employee databases.
• Class Level:

• Instance Level:

86 of 131
UML COMPONENT DIAGRAM

√ Example:

87 of 131
UML DEPLOYMENT DIAGRAM

√ A deployment diagram is a UML structure diagram which


shows architecture of the system as deployment
(distribution) of software artifacts to deployment targets.
√ A deployment diagram is a diagram that shows the
configuration of run time processing nodes and the
components that live on them.

√ Software deployment is all of the activities that make a


software system available for use.

88 of 131
UML DEPLOYMENT DIAGRAM

89 of 131
UML DEPLOYMENT DIAGRAM

√ Basic Symbols and Notations:


− Artifacts represent concrete elements in the physical
world that are the result of a development process.
• text document, source file, script, binary executable file,
archive file, database table

90 of 131
UML DEPLOYMENT DIAGRAM

√ Basic Symbols and Notations:


− Artifacts (cont.)
• Artifacts can be involved in associations to other artifacts.

• Artifacts can be involved in dependency relationship with


other artifacts.

91 of 131
UML DEPLOYMENT DIAGRAM

√ Basic Symbols and Notations: (cont.)


− Nodes represent either hardware devices or software
execution environments.
• An execution environment is a software node that offers an
execution environment for specific types of components that
are deployed on it in the form of executable artifacts.
• A device is a node which represents a physical
computational resource with processing capability upon
which artifacts may be deployed for execution.

92 of 131
UML DEPLOYMENT DIAGRAM

√ Basic Symbols and Notations: (cont.)


− A communication path is association between two
deployment targets, through which they are able to
exchange signals and messages.

93 of 131
UML DEPLOYMENT DIAGRAM

√ Example (web application):


− Book club web application artifact book_club_app.war is deployed on
Catalina Servlet 2.4 / JSP 2.0 Container which is part of Apache Tomcat
5.5 web server.
− The book_club_app.war artifact manifests (embodies) OnlineOrders
component. The artifact contains three other artifacts, one of which
manifests UserServices component.
− The Application Server «device» (computer server) has communication
path to Database Server «device» (another server).
• A WAR file (Web Application Resource or Web application ARchive) is a file
used to distribute a collection of JAR-files, JavaServer Pages, Java Servlets,
Java classes, XML files, tag libraries, static web pages (HTML and related
files) and other resources that together constitute a web application.

94 of 131
UML DEPLOYMENT DIAGRAM

95 of 131
DATA FLOW DIAGRAM

√ A Data Flow Diagram (DFD) is a way of representing a


flow of a data of a process or a system.
√ A Data Flow Diagram has no control flow, there are no
decision rules and no loops.
√ The Data Flow Diagram is part of the structured-analysis
modelling tools.
√ When using UML, the activity diagram typically takes
over the role of the Data Flow Diagram.

96 of 131
DATA FLOW DIAGRAM

√ Basic Symbols and Notations:


− External agent
• an outside person, unit, system, or organization that
interacts with a system.
• Named with descriptive, singular noun
• Ex: Student, Employee, Student Affairs Office

97 of 131
DATA FLOW DIAGRAM

√ Basic Symbols and Notations: (cont.)


− Processes
• work performed by a system in response to incoming data
flows or conditions.
• Named with a strong action verb followed by object clause
describing what the work is performed on/for.
• Ex: Register to a course, Send an e-mail

98 of 131
DATA FLOW DIAGRAM

√ Basic Symbols and Notations: (cont.)


− Data stores
• stored data intended for later use.
• frequently implemented as a file or database.
• Named with plural noun
• Ex: Courses, Partners

99 of 131
DATA FLOW DIAGRAM

√ A Context Level DFD shows the


− system boundaries,
− external entities that interact with the system,
− major information flows between entities and the system
√ A Level–0 DFD represents the primary individual processes
in the system at the highest possible level of detail including
the data stores.
√ A Level–1 DFD represents the first level for the splitted
processes and the data flow through these processes also
including the data stores and external agents.

100 of 131
DATA FLOW DIAGRAM

√ Example: Context Level DFD

101 of 131
DATA FLOW DIAGRAM

√ Example: Level – 0 DFD

102 of 131
DATA FLOW DIAGRAM

√ Example: Level – 1 DFD

103 of 131
DATA FLOW DIAGRAM

√ Example: Level – 2 DFD

104 of 131
DATA FLOW DIAGRAM

√ Example: Context Level DFD

105 of 131
DATA FLOW DIAGRAM

√ Example: Level – 0 DFD

106 of 131
DATA FLOW DIAGRAM

√ Data Flow Diagramming Rules: Process

√ Data Flow Diagramming Rules: External Agent

107 of 131
DATA FLOW DIAGRAM

√ Data Flow Diagramming Rules: Data Store

108 of 131
DECISION TABLE

√ DFDs do not show the logic inside the processes


− Logic modeling represents the internal structure of processes
√ Decision Table is used to construct the logic model
− A matrix representation of the logic of a decision
− Specifies the possible conditions and the resulting actions
− Consists of three parts:
• Condition stubs: Lists condition relevant to decision
• Action stubs: Actions that result for a given set of conditions
• Rules: Specify which actions are to be followed for a given set
of conditions

109 of 131
DECISION TABLE

√ Decision Table Construction Steps:


− Step#1: Specify the conditions
− Step#2: Identify the actions
− Step#3: Figure out the rules
− Step#4: Construct the decision table
− Step#5: Prepare the reduced decision table, if necessary
• Write single rule for the rules with the same action and
unchanged conditions.

110 of 131
DECISION TABLE

√ Example (Check Cashing Policy Statement): A


customer with check cashing priviledges is entitled to
cash personal checks of up to $75.00 and payroll
checks from companies pre-approved by LMART. This
card is issued in accordance with the terms and
conditions of the application is subject to change without
notice.

111 of 131
DECISION TABLE

√ Example (Check Cashing Policy Statement):


− Conditions
• C1: Type of check → Personal (PE), Payroll (PA)
• C2: Amount of check → Less than or equal to $75.00
(LE75), Greater than $75.00 (GT75)
• C3: Accredited by LMART → YES, NO

112 of 131
DECISION TABLE

√ Example (Check Cashing Policy Statement):


− Actions
• A1: Cash the check
• A2: Don’t cash the check

113 of 131
DECISION TABLE

√ Example (Check Cashing Policy Statement):


− Rules
• There are 2 different values for C1 (PE,PA).
• There are 2 different values for C2 (LE75,GT75).
• There are 2 different values for C3 (YES,NO).
• There are 2 x 2 x 2 = 8 rules in total.
◊ Use cartesian product set construction methodology to write
all possible rules.

114 of 131
DECISION TABLE

√ Example (Check Cashing Policy Statement):


− Decision Table ==>
Conditions / Rule Rule Rule Rule Rule Rule Rule Rule
Actions #1 #2 #3 #4 #5 #6 #7 #8
C1: Type of
check
C2: Amount of
check
C3: Accredited
by LMART
A1: Cash the
check
A2: Don't cash
the check

115 of 131
DECISION TABLE

√ Example (Check Cashing Policy Statement):


− Decision Table ==>
Conditions / Rule Rule Rule Rule Rule Rule Rule Rule
Actions #1 #2 #3 #4 #5 #6 #7 #8
C1: Type of
PE PE PE PE PA PA PA PA
check
C2: Amount of
check
C3: Accredited
by LMART
A1: Cash the
check
A2: Don't cash
the check

116 of 131
DECISION TABLE

√ Example (Check Cashing Policy Statement):


− Decision Table ==>
Conditions / Rule Rule Rule Rule Rule Rule Rule Rule
Actions #1 #2 #3 #4 #5 #6 #7 #8
C1: Type of
PE PE PE PE PA PA PA PA
check
C2: Amount of
LE75 LE75 GT75 GT75 LE75 LE75 GT75 GT75
check
C3: Accredited
by LMART
A1: Cash the
check
A2: Don't cash
the check

117 of 131
DECISION TABLE

√ Example (Check Cashing Policy Statement):


− Decision Table ==>
Conditions / Rule Rule Rule Rule Rule Rule Rule Rule
Actions #1 #2 #3 #4 #5 #6 #7 #8
C1: Type of
PE PE PE PE PA PA PA PA
check
C2: Amount of
LE75 LE75 GT75 GT75 LE75 LE75 GT75 GT75
check
C3: Accredited
YES NO YES NO YES NO YES NO
by LMART
A1: Cash the
check
A2: Don't cash
the check

118 of 131
DECISION TABLE

√ Example (Check Cashing Policy Statement):


− Decision Table ==>
Conditions / Rule Rule Rule Rule Rule Rule Rule Rule
Actions #1 #2 #3 #4 #5 #6 #7 #8
C1: Type of
PE PE PE PE PA PA PA PA
check
C2: Amount of
LE75 LE75 GT75 GT75 LE75 LE75 GT75 GT75
check
C3: Accredited
YES NO YES NO YES NO YES NO
by LMART
A1: Cash the
X X X X
check
A2: Don't cash
X X X X
the check

119 of 131
DECISION TABLE

√ Example (Check Cashing Policy Statement):


− Reduced Decision Table ==>
Conditions /
Rule #1 Rule #2 Rule #5 Rule #6
Actions
C1: Type of check PE PE PA PA
C2: Amount of Doesn't Doesn't
LE75 GT75
check matter matter

C3: Accredited by Doesn't Doesn't


YES NO
LMART matter matter

A1: Cash the


X X
check
A2: Don't cash the
X X
check

120 of 131
DECISION TABLE

√ Example (Inventory Reordering System):


− The reordering depends on whether the item is perishable.
• If an item is perishable, such as, meat, vegetables, or
bread, the company has a standing order with a local
supplier stating that a prespecified amount of food is
delivered each weekday for that day's use and each
Saturday for weekend use.
• If the item is not perishable, such as straws, cups, and
napkins, an order is placed when the stock on hand reaches
a certain predetermined minimum reorder quantity.

121 of 131
DECISION TABLE

√ Example (Inventory Reordering System):


− The company also realizes the importance of seasonality
of their work.
• Their business is not as good during the summer months
when the students are off campus as it is during the
academic year.
• They also note that business falls off during holiday and
spring breaks.
◊ Their standing orders with all their suppliers are reduced by
specific amounts during the summer and holiday breaks.

122 of 131
DECISION TABLE

√ Example (Inventory Reordering System):


− Conditions
• C1: Type of item → Perishable (PE), Non-Perishable (NP)
• C2: Time of week → Weekday (WD), Weekend (WE)
• C3: Season of year → Academic (A), Summer (S), Break
(B)

123 of 131
DECISION TABLE

√ Example (Inventory Reordering System):


− Actions
• A1: Standing daily order
• A2: Standing weekend order
• A3: Standing order with minimum reorder quantity
• A4: Reducing order quantity in breaks
• A5: Reducing order quantity in summer

124 of 131
DECISION TABLE

√ Example (Inventory Reordering System):


− Rules
• There are 2 different values for C1 (PE,NP).
• There are 2 different values for C2 (WD,WE).
• There are 3 different values for C3 (A,S,B).
• There are 2 x 2 x 3 = 12 rules in total.
◊ Use cartesian product set construction methodology to write
all possible rules.

125 of 131
DECISION TABLE

√ Example (Inventory Reordering System):


− Decision Table ==>

Conditions Rule Rule Rule Rule Rule Rule Rule Rule Rule Rule Rule Rule
/ Actions #1 #2 #3 #4 #5 #6 #7 #8 #9 #10 #11 #12

C1 PE NP PE NP PE NP PE NP PE NP PE NP
C2
C3
A1
A2
A3
A4
A5

126 of 131
DECISION TABLE

√ Example (Inventory Reordering System):


− Decision Table ==>

Conditions Rule Rule Rule Rule Rule Rule Rule Rule Rule Rule Rule Rule
/ Actions #1 #2 #3 #4 #5 #6 #7 #8 #9 #10 #11 #12

C1 PE NP PE NP PE NP PE NP PE NP PE NP
C2 WD WD WE WE WD WD WE WE WD WD WE WE
C3
A1
A2
A3
A4
A5

127 of 131
DECISION TABLE

√ Example (Inventory Reordering System):


− Decision Table ==>

Conditions Rule Rule Rule Rule Rule Rule Rule Rule Rule Rule Rule Rule
/ Actions #1 #2 #3 #4 #5 #6 #7 #8 #9 #10 #11 #12

C1 PE NP PE NP PE NP PE NP PE NP PE NP
C2 WD WD WE WE WD WD WE WE WD WD WE WE
C3 A A A A S S S S B B B B
A1
A2
A3
A4
A5

128 of 131
DECISION TABLE

√ Example (Inventory Reordering System):


− Decision Table ==>

Conditions Rule Rule Rule Rule Rule Rule Rule Rule Rule Rule Rule Rule
/ Actions #1 #2 #3 #4 #5 #6 #7 #8 #9 #10 #11 #12

C1 PE NP PE NP PE NP PE NP PE NP PE NP
C2 WD WD WE WE WD WD WE WE WD WD WE WE
C3 A A A A S S S S B B B B
A1 X X X
A2 X X X
A3 X X X X X X
A4 X X
A5 X X

129 of 131
DECISION TABLE

√ Example (Inventory Reordering System):


− Reduced Decision Table ==>

Conditions Rule Rule Rule Rule Rule Rule Rule


/ Actions #1 #2 #3 #4 #5 #6 #7

C1 PE PE PE PE PE PE NP
C2 WD WE WD WE WD WE -
C3 A A S S H H -
A1 X X X
A2 X X X
A3 X
A4 X X
A5 X X

130 of 131
REFERENCES
√ The below resources are used to prepare some examples and figures given in these
slides:
− https://www.uml-diagrams.org/
− https://creately.com/blog/diagrams/uml-diagram-types-examples/
− https://www.guru99.com/software-development-life-cycle-tutorial.html
− http://ecomputernotes.com/software-engineering/write-a-note-on-software-design-phases
− https://www.geeksforgeeks.org/software-engineering-software-design-process/
− http://www.differencebetween.info/difference-between-uml-1-and-uml-2
− https://slideplayer.com/slide/14841300/
− https://medium.com/@warren2lynch/a-comprehensive-guide-to-14-types-of-uml-diagram-
affcc688377e
− https://www.visual-paradigm.com/guide/uml-unified-modeling-language/what-is-state-
machine-diagram/
− https://online.visual-paradigm.com/diagrams/tutorials/state-machine-diagram-tutorial/

131 of 131

You might also like