0% found this document useful (0 votes)
6 views

SE Unit 3 Module 1

The document outlines the course objectives and outcomes for a Software Engineering class at Matrusri Engineering College, detailing key concepts in software development processes, methodologies, and testing strategies. It covers various modeling approaches, including requirements analysis, data modeling, and object-oriented analysis, along with guidelines for creating analysis models and use-cases. Additionally, it emphasizes the importance of collaboration and responsibilities among analysis classes within the software development lifecycle.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

SE Unit 3 Module 1

The document outlines the course objectives and outcomes for a Software Engineering class at Matrusri Engineering College, detailing key concepts in software development processes, methodologies, and testing strategies. It covers various modeling approaches, including requirements analysis, data modeling, and object-oriented analysis, along with guidelines for creating analysis models and use-cases. Additionally, it emphasizes the importance of collaboration and responsibilities among analysis classes within the software development lifecycle.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 59

MATRUSRI

ENGINEERING COLLEGE

MATRUSRI ENGINEERING COLLEGE


DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

SUBJECT NAME: Software Engineering

FACULTY NAME: Mrs.K.Shalini

Insert Your Photo here


MATRUSRI
ENGINEERING COLLEGE

SOFTWARE ENGINEERING

COURSE OBJECTIVES:

•To introduce the basic concepts of software development processes from defining a product to
shipping and maintaining
•To impart knowledge on various phases, methodologies and practices of software development
•To understand the importance of testing in software development, study various testing strategies
along with its relationship with software quality and metrics

COURSE OUTCOMES:
Describe basic concepts of software engineering, different software development process models
and list the various capabilities maturity models.
Explain software engineering principles, system hierarchy and identify the user requirements
engineering tasks.
Analyze the user requirements and translate them to design a model.
Create an architectural, component and user interface design.
Distinguish between different types and levels of testing strategies for conventional applications
and also illustrate the various product metrics for SDLC phases.
MATRUSRI
ENGINEERING COLLEGE

UNIT-III
INTRODUCTION:
This unit discusses about building an analysis model to elaborate the requirements
analysis process and it explains various concepts of design engineering .

OUTCOMES:
Upon completion of this unit, student will be able to:
 Model Use Cases, Class Diagrams.
Model State chart Diagrams and DFDs.
Explain Design concepts in context of a software application.
MATRUSRI
ENGINEERING COLLEGE

MODULE-I

CONTENTS:
Building The Analysis Model: Requirements Analysis Modeling Approaches, Data
Modeling Concepts, Object- Oriented Analysis, Scenario-based Modeling, Flow-
oriented Modeling, Class-based Modeling, Creating A Behavioral Model.

OUTCOMES:

Upon completion of this module, student will be able to:


Model Use Cases, Class Diagrams.
Model State chart Diagrams and DFDs.
MATRUSRI
ENGINEERING COLLEGE

Requirements Analysis
• Requirements analysis
– specifies software’s operational characteristics
– indicates software's interface with other system elements
– establishes constraints that software must meet
• Requirements analysis allows the software engineer (called
an analyst) to:
– elaborate on basic requirements established during earlier
requirement engineering tasks
– build models that depict
• user scenarios,
• functional activities,
• problem classes and their relationships,
• system and class behavior, and
• the flow of data as it is transformed.
MATRUSRI
ENGINEERING COLLEGE

A Bridge

system
description

analysis
model

design
model
MATRUSRI
ENGINEERING COLLEGE

Analysis Rules of Thumb


• Keep the model as simple as it can be.

• Each element of the analysis model should add to an overall


understanding of software requirements and provide insight into
the information domain, function and behavior of the system.

• The model should focus on requirements that are visible within


the problem or business domain. The level of abstraction should
be relatively high.

• Minimize coupling throughout the system.

• Be certain that the analysis model provides value to all


stakeholders.
MATRUSRI
ENGINEERING COLLEGE

Domain Analysis
• Software domain analysis is the identification, analysis, and
specification of common requirements from a specific application
domain, for reuse on multiple projects within that application domain.

• Object-oriented domain analysis is the identification, analysis, and


specification of common, reusable capabilities within a specific
application domain, in terms of common objects, classes,
subassemblies, and frameworks.

Steps in Domain Analysis:

• Define the domain to be investigated.


• Collect a sample of applications in the domain.
• Analyze each application in the sample.
• Develop an analysis model for the objects.
MATRUSRI
ENGINEERING COLLEGE

Data Modeling Concepts


• Examines data objects independently for processing
• Focuses attention on the data domain
• Creates a model at the customer’s level of abstraction
• Indicates how data objects relate to one another

What is a Data Object?


An object is something that is described by a set of attributes (Data Items) and that
will be manipulated within the software (system).
• Each instance of an object can be identified uniquely (Ex: Book & ISBN#).
• Each object is described by attributes which are data items.
• Each object plays a necessary role in the system i.e., the system could not
function without access to instances of the object.
Various objects include External Entities (Ex: Users, Printers), Things (Ex:
Reports), Events (Ex: Interrupts), Roles (Ex: Manager), Places (Ex:
Manufacturing Floor), Structures (Ex: Emp. Records), Organizational Units
(Ex: Testing Teams)
MATRUSRI
ENGINEERING COLLEGE

Data Objects and Attributes


A data object contains a set of attributes that act as an aspect,
characteristic, or descriptor of the object.
Data Attributes define properties of a data object and has one of
following three characteristics:
• Name the instance of the data object.
• Describe the instance.
• Make reference to another instance in another table.
MATRUSRI
ENGINEERING COLLEGE

Relationships
• A Relationship indicates “connectedness”. It is a fact that must be
"remembered” by the system and cannot be computed or derived
mechanically.
• Objects can be related in many different ways
• Several instances of a relationship can exist
Dependency Relationship:

Association Relationship:
MATRUSRI
ENGINEERING COLLEGE

Versions of Association Relationship


MATRUSRI
ENGINEERING COLLEGE

Relationships
Generalization/Specialization Relationship (Inheritance):

Realization Relationship:
MATRUSRI
ENGINEERING COLLEGE

Analysis Modeling Approaches


Structural analysis:
• The data: The model defines their attributes and
relationships.
• The processes that transform the data: The model shows
how they transform the data objects as they flow through
the system.

Object-oriented analysis:
• Focus will be on Classes and their inter-relationships
• UML is predominantly object-oriented
MATRUSRI
ENGINEERING COLLEGE

Object-Oriented Analysis
The intent of OOA is to define all classes that are relevant to
the problem to be solved.

Key concepts:
• Classes and objects
• Attributes and operations
• Encapsulation and instantiation
• Inheritance
MATRUSRI
ENGINEERING COLLEGE

Elements of the Analysis Model


MATRUSRI
ENGINEERING COLLEGE

Scenario-Based Modeling
Writing Use-Cases:

A use-case captures the interactions that occur between


producers and consumers of information (actors) and the
system itself. Consider the following issues to write use-
cases:
(1) What should we write about?
(2) How much should we write about it?
(3) How detailed should we make our description?
(4) How should we organize the description?
MATRUSRI
ENGINEERING COLLEGE

Use-Cases
Use-Case is a set of sequence of actions performed by an actor that
describes a “thread of usage” for a system and generates an
appropriate output.
actors represent roles people or devices play as the system functions
users can play a number of different roles for a given scenario

Developing a Use-Case:
What are the main tasks or functions that are performed by the actor?
What system information will the the actor acquire, produce or change?
Will the actor have to inform the system about changes in the external
environment?
What information does the actor desire from the system?
Does the actor wish to be informed about unexpected changes?
MATRUSRI
ENGINEERING COLLEGE

Use-Case Diagram

SafeHome

Access camera
surveillance via the cameras
Internet

Configure SafeHome
system parameters

homeowner

Set alarm
MATRUSRI
ENGINEERING COLLEGE

Activity Diagram
Supplements the use-case by providing a diagrammatic representation of
procedural flow
MATRUSRI
ENGINEERING COLLEGE

Activity Diagram
MATRUSRI
ENGINEERING COLLEGE

Swim Lane Diagrams


Allows modeler to represent flow of activities described by the use-case and at the same time
indicate which actor (if there are multiple actors involved in a specific use-case) or analysis class
has responsibility for action described by an activity rectangle
MATRUSRI
ENGINEERING COLLEGE

Swim Lane Diagrams


MATRUSRI
ENGINEERING COLLEGE

Class-Based Modeling
• Identify analysis classes by examining the problem statement
• Use a “grammatical parse” to isolate potential classes
• Identify the attributes of each class
• Identify operations that manipulate the attributes
MATRUSRI
ENGINEERING COLLEGE

Identifying Analysis Classes


External entities (e.g., other systems, devices, people)
that produce or consume information to be used by a
computer-based system.
Things (e.g, reports, displays, letters, signals) that are
part of the information domain for the problem.
Occurrences or events (e.g., a property transfer or the
completion of a series of robot movements) that occur
within the context of system operation.
Roles (e.g., manager, engineer, salesperson) played by
people who interact with the system.
Organizational units (e.g., division, group, team) that
are relevant to an application.
Places (e.g., manufacturing floor or loading dock) that
establish the context of the problem and the overall
function of the system.
Structures (e.g., sensors, four-wheeled vehicles, or
computers) that define a class of objects or related classes
of objects.
MATRUSRI
ENGINEERING COLLEGE

Selecting Classes: Characteristics


1. Retained Information: its inf. shall be remembered.
2. Needed Services: have a set of operations to change its
attributes.
3. Multiple Attributes: to be major enough.
4. Common Attributes: for all its instances.
5. Common Operations: for all its instances.
6. Essential Requirements: those who provide essential
inf., usually external entities.
MATRUSRI
ENGINEERING COLLEGE

UML Class Diagram Notation


MATRUSRI
ENGINEERING COLLEGE

Class Diagram
MATRUSRI
ENGINEERING COLLEGE

CRC Modeling
• Analysis classes have “responsibilities”
• Responsibilities generate the attributes and
operations encapsulated by the class
• Analysis classes collaborate with one another
• Collaborators are collection of those classes that
are required to provide a class with the information
needed to complete a responsibility.
• In general, a collaboration implies either a request
for information or a request for some action.
MATRUSRI
ENGINEERING COLLEGE

Responsibilities
• Guidelines to allocate responsibilities to classes:
• System intelligence should be distributed across
classes to best address the needs of the problem
• Information and the behavior related to it should
reside within the same class (i.e, encapsulation)
• Information about one thing should be localized
with a single class, not distributed across multiple
classes.
• Each responsibility should be stated as generally as
possible (high enough in hierarchy)
• Responsibilities should be shared among related
classes, when appropriate.
MATRUSRI
ENGINEERING COLLEGE

Collaborations
• Classes fulfill the responsibilities in one of two ways:
 A class can use its own operations to manipulate its own
attributes, thereby fulfilling a particular responsibility, or
 A class can collaborate with other classes.

• Collaborations identify relationships between classes


• Collaborations are identified by determining whether a class can
fulfill each responsibility itself
MATRUSRI
ENGINEERING COLLEGE

Class Relationships
• Two analysis classes are often related to one another in some fashion
• In UML these relationships are called associations
• Associations can be refined by indicating multiplicity (the term cardinality
is used in data modeling)
• In many instances, a client-server relationship exists between two analysis
classes.
• In such cases, a client-class depends on the server-class in some way and a
dependency relationship is established
Dependencies

DisplayWindow Camera

<<access>>

{password}

33
Association with Multiplicity
Wall

1 1 1

is used to build is used to build

1..* 0..* is used to build 0..*

WallSegment Window Door

34
Composite Aggregate Class
Player

PlayerHead PlayerBody PlayerArms PlayerLegs

35
Class Types
• Entity classes, also called model or business classes, are extracted directly from the
statement of the problem.
• Boundary classes are used to create the interface (e.g., interactive screen or printed
reports) that the user sees and interacts with as the software is used.

• Controller classes manage a “unit of work” from start to finish (design time). That is,
controller classes can be designed to manage
– the creation or update of entity objects;
– the instantiation of boundary objects as they obtain information from entity objects;
– complex communication between sets of objects;
– validation of data communicated between objects or between user and application.

36
CRC Modeling Cards
Class:
Class:
Description:
Class:
Description:
Class:FloorPlan
Description:
Responsibility:
Description: Collaborator:
Responsibility: Collaborator:
Responsibility: Collaborator:
Responsibility: Collaborator:
defines floor plan name/type
manages floor plan positioning
scales floor plan for display
scales floor plan for display
incorporates walls, doors and windows Wall
shows position of video cameras Camera

37
Reviewing the CRC Model (Approaches)
• All participants in the review (of the CRC model) are given a subset of the CRC model index
cards.
– Cards that collaborate should be separated (i.e., no reviewer should have two cards that
collaborate).
• All use-case scenarios (and corresponding use-case diagrams) should be organized into
categories.
• The review leader reads the use-case deliberately.
– As the review leader comes to a named object, she passes a token to the person holding
the corresponding class index card.
• When the token is passed, the holder of the class card is asked to describe the responsibilities
noted on the card.
– The group determines whether one (or more) of the responsibilities satisfies the use-case
requirement.
• If the responsibilities and collaborations noted on the index cards cannot accommodate the
use-case, modifications are made to the cards.
– This may include the definition of new classes (and corresponding CRC index cards) or the
specification of new or revised responsibilities or collaborations on existing card s.

38
Analysis Packages
• Various elements of the analysis model (e.g., use-
cases, analysis classes) are categorized in a manner
that packages them as a grouping
• The plus sign preceding the analysis class name in each
package indicates that the classes have public visibility
and are therefore accessible from other packages.
• Other symbols can precede an element within a
package. A minus sign indicates that an element is
hidden from all other packages and a # symbol
indicates that an element is accessible only to
packages contained within a given package.

39
Analysis Packages
package name

Environment
+Tree
+Landscape
+Road
+Wall
+Bridge
+Building RulesOfTheGame
+VisualEffect
+Scene +RulesOfMovement
+ConstraintsOnAction

Characters

+Player
+Protagonist
+Antagonist
+SupportingRole

40
Flow-Oriented Modeling
A data flow diagram (DFD) is the diagrammatic form that is used to
“represent how data objects are transformed as they move through
the system”
Considered by many to be an ‘old school’ approach, flow-oriented
modeling continues to provide a view of the system that is unique—
it should be used to supplement other analysis model elements.

The Flow Model:

computer
computer
input based
based output
system
system

41
Flow Modeling Notation

external entity

process

data flow

data store

42
External Entity
A producer or consumer of data

Examples: a person, a device, a sensor

Another example: computer-based


system

Data must always originate somewhere


and must always be sent to something

43
Process
A data transformer (changes input
to output)

Examples: compute taxes, determine area, format


report, display graph

Data must always be processed in some way to


achieve system function

44
Data Flow

Data flows through a system, beginning


as input and be transformed into output.

base
compute
area
triangle
height area

45
Data Stores
Data is often stored for later use.

sensor #
sensor #, type,
look-up location, age
sensor
report required data
type,
location, age
sensor number

sensor data

46
Creating a Data Flow Model:
Creating a Data Flow Model 0r DFD always begins with a context
level diagram (also called level 0).The DFD evolves through a
number of levels of detail.
Guidelines:
• Level 0 DFD should depict software/system as single bubble.
• Primary input and output should be carefully noted.
• All arrows & bubbles must be labeled with meaningful names
• Information flow continuity must be maintained from level to
level.
• One bubble at a time should be refined.
• Always show external entities at level 0
Level 0 DFD Example

48
Constructing a Level 1 DFD
• Review the data model to isolate data objects
and use a grammatical parse to determine
“operations”
• Determine external entities (producers and
consumers of data)
Constructing a Level 2 DFD
• Write a narrative describing the transform
• “Balance” the flow to maintain data flow
continuity
• Use a 1:5 (approx.) expansion ratio of
information

50
• The refinement of DFDs continues until each
bubble performs a single function.
• Cohesion can be used to assess the simplicity of a
function.
• The expansion ratio may decrease as the number
of levels increase
• Most systems require between 3 and 7 levels for
an adequate flow model

51
Control Flow Diagrams
• Represents “events” and the processes that
manage events. An “event” or control item is
a Boolean value (Ex: 1 or 0, T or F, On or Off)
or list of Boolean conditions. Guidelines to
select potential events:
• List all sensors that are "read" by the software.
• List all interrupt conditions.
• List all data conditions.
• List all "switches" that are actuated by an operator.
• Focus on possible omissions.
• Describe behavior of a system by identifying its states

52
Control Specification (CSPEC)
CSPEC represents the behavior of the system in two
different ways. It contains a State Diagram that is a
sequential specification behavior. It can also contain a
Program Activation Table- a combinational
specification of behavior.

CSPEC gives us no information about inner working of


processes that are activated as a result of this
behavior.

53
Process Specification (PSPEC)
• PSPEC is used to describe all flow model processes that
appear at the final level of refinement. The content of
PSPEC include narrative text, a Program Design
Language (PDL) description of the process algorithm,
mathematical equations, tables, diagrams or charts.
• By providing PSPEC to accompany each bubble in flow
model, SE creates a “mini-spec” which serves as a
guide for design of software component.

54
Behavioral Modeling
• The behavioral model indicates how software will respond to external
events or stimuli. To create the model, the analyst must perform the
following steps:
• Evaluate all use-cases to fully understand the sequence of interaction
within the system.
• Identify events that drive the interaction sequence and understand how
these events relate to specific objects.
• Create a sequence for each use-case.
• Build a state diagram for the system.
• Review the behavioral model to verify accuracy and consistency.

55
State Representations
The States of a System:
• state—a set of observable circumstances that characterizes
the behavior of a system at a given time
• state transition—the movement from one state to another
• event—an occurrence that causes the system to exhibit
some predictable form of behavior
• action—process that occurs as a consequence of making a
transition
• In the context of behavioral modeling, two different
characterizations of states must be considered:
– state of each class as the system performs its function and
– state of system as observed from outside as system performs its
function
State Diagram for Library Management System

57
Behavioral Modeling

• make a list of the different states of a


system (How does the system behave?)
• indicate how the system makes a
transition from one state to another
(How does the system change state?)
– indicate event
– indicate action
• draw a state diagram or a sequence
diagram
58
Sequence Diagram

You might also like