Software Engineering Notes (Unit-III)
Software Engineering Notes (Unit-III)
Software Engineering Notes (Unit-III)
Unit-III
Building the Analysis Modeling
Goals of Analysis Modeling
• Provides the first technical representation of a system
• Is easy to understand and maintain
• Deals with the problem of size by partitioning the system
• Uses graphics whenever possible
• Differentiates between essential information versus implementation information
• Helps in the tracking and evaluation of interfaces
• Provides tools other than narrative text to describe software logic and policy
A Set of Models
• Flow-oriented modeling – provides an indication of how data objects are transformed
by a set of processing functions
• Scenario-based modeling – represents the system from the user's point of view
• Class-based modeling – defines objects, attributes, and relationships
• Behavioral modeling – depicts the states of the classes and the impact of events on
these states
Requirements Analysis
Purpose
• Specifies the software's operational characteristics
• Indicates the software's interfaces with other system elements
• Establishes constraints that the software must meet
• Provides the software designer with a representation of information, function, and
behavior
– This is later translated into architectural, interface, class/data and component-
level designs
• Provides the developer and customer with the means to assess quality once the
software is built
Overall Objectives
• Three primary objectives
– To describe what the customer requires
– To establish a basis for the creation of a software design
– To define a set of requirements that can be validated once the software is built
• All elements of an analysis model are directly traceable to parts of the design model,
and some parts overlap
Domain Analysis
• Definition
– The identification, analysis, and specification of common, reusable capabilities
within a specific application domain
– Do this in terms of common objects, classes, subassemblies, and frameworks
• Sources of domain knowledge
– Technical literature
– Existing applications
– Customer surveys and expert advice
– Current/future requirements
• Outcome of domain analysis
– Class taxonomies
– Reuse standards
– Functional and behavioral models
– Domain languages
Flow-oriented Modeling
Data Modeling
• Identify the following items
– Data objects (Entities)
– Data attributes
– Relationships
– Cardinality (number of occurrences)
Scenario-based Modeling
Writing Use Cases
• It is effective to use the first person “I” to describe how the actor interacts
Activity Diagrams
• Supplements the use case by providing a graphical representation of the
flow of interaction within a specific scenario
• Uses flowchart-like symbols
– Rounded rectangle - represent a specific system function/action
– Arrow - represents the flow of control from one function/action to
another
– Diamond - represents a branching decision
– Solid bar – represents the fork and join of parallel activities
Example: Activity Diagram
Class-based Modeling
Identifying Analysis Classes
1) Perform a grammatical parse of the problem statement or use cases
2) Classes are determined by underlining each noun or noun clause
3) A class required to implement a solution is part of the solution space
4) A class necessary only to describe a solution is part of the problem space
5) A class should NOT have an imperative procedural name (i.e., a verb)
6) List the potential class names in a table and "classify" each class according to some
taxonomy and class selection characteristics
7) A potential class should satisfy nearly all (or all) of the selection characteristics to be
considered a legitimate problem domain class
computer)
Behavioral Modeling
Creating a Behavioral Model
1) Identify events found within the use cases and implied by the attributes in the class
diagrams
2) Build a state diagram for each class, and if useful, for the whole software system
Purpose of Design
• Design is where customer requirements, business needs, and technical considerations
all come together in the formulation of a product or system
• The design model provides detail about the software data structures, architecture,
interfaces, and components
• The design model can be assessed for quality and be improved before code is
generated and tests are conducted
– Does the design contain errors, inconsistencies, or omissions?
– Are there better design alternatives?
– Can the design be implemented within the constraints, schedule, and cost that
have been established?
• A designer must practice diversification and convergence
– The designer selects from design components, component solutions, and
knowledge available through catalogs, textbooks, and experience
– The designer then chooses the elements from this collection that meet the
requirements defined by requirements engineering and analysis modeling
– Convergence occurs as alternatives are considered and rejected until one
particular configuration of components is chosen
• Software design is an iterative process through which requirements are translated into
a blueprint for constructing the software
– Design begins at a high level of abstraction that can be directly traced back to
the data, functional, and behavioral requirements
– As design iteration occurs, subsequent refinement leads to design
representations at much lower levels of abstraction
From Analysis Model to Design Model
• Each element of the analysis model provides information that is necessary to create the
four design models
– The data/class design transforms analysis classes into design classes along
with the data structures required to implement the software
– The architectural design defines the relationship between major structural
elements of the software; architectural styles and design patterns help achieve
the requirements defined for the system
– The interface design describes how the software communicates with systems
that interoperate with it and with humans that use it
– The component-level design transforms structural elements of the software
architecture into a procedural description of software components
From Analysis Model to Design Model
Design Quality
Quality's Role
• The importance of design is quality
• Design is the place where quality is fostered
– Provides representations of software that can be assessed for quality
– Accurately translates a customer's requirements into a finished software product
or system
– Serves as the foundation for all software engineering activities that follow
• Without design, we risk building an unstable system that
– Will fail when small changes are made
– May be difficult to test
– Cannot be assessed for quality later in the software process when time is short
and most of the budget has been spent
• The quality of the design is assessed through a series of formal technical reviews or
design walkthroughs
Design Concepts
• Abstraction
– Procedural abstraction – a sequence of instructions that have a specific and
limited function
– Data abstraction – a named collection of data that describes a data object
• Architecture
– The overall structure of the software and the ways in which the structure
provides conceptual integrity for a system
– Consists of components, connectors, and the relationship between them
• Patterns
– A design structure that solves a particular design problem within a specific
context
– It provides a description that enables a designer to determine whether the
pattern is applicable, whether the pattern can be reused, and whether the pattern
can serve as a guide for developing similar patterns
• Modularity
– Separately named and addressable components (i.e., modules) that are
integrated to satisfy requirements (divide and conquer principle)
– Makes software intellectually manageable so as to grasp the control paths, span
of reference, number of variables, and overall complexity
• Information hiding
– The designing of modules so that the algorithms and local data contained within
them are inaccessible to other modules
– This enforces access constraints to both procedural (i.e., implementation) detail
and local data structures
• Functional independence
– Modules that have a "single-minded" function and an aversion to excessive
interaction with other modules
– High cohesion – a module performs only a single task
– Low coupling – a module has the lowest amount of connection needed with
other modules
• Stepwise refinement
– Development of a program by successively refining levels of procedure detail
– Complements abstraction, which enables a designer to specify procedure and
data and yet suppress low-level details
• Refactoring
– A reorganization technique that simplifies the design (or internal code structure)
of a component without changing its function or external behavior
– Removes redundancy, unused design elements, inefficient or unnecessary
algorithms, poorly constructed or inappropriate data structures, or any other
design failures
• Design classes
– Refines the analysis classes by providing design detail that will enable the
classes to be implemented
– Creates a new set of design classes that implement a software infrastructure to
support the business solution
Types of Design Classes
• User interface classes – define all abstractions necessary for human-computer
interaction (usually via metaphors of real-world objects)
• Business domain classes – refined from analysis classes; identify attributes and
services (methods) that are required to implement some element of the business
domain
• Process classes – implement business abstractions required to fully manage the
business domain classes
• Persistent classes – represent data stores (e.g., a database) that will persist beyond the
execution of the software
• System classes – implement software management and control functions that enable
the system to operate and communicate within its computing environment and the
outside world
Design Elements
• Data/class design
– Creates a model of data and objects that is represented at a high level of
abstraction
• Architectural design
– Depicts the overall layout of the software
• Interface design
– Tells how information flows into and out of the system and how it is
communicated among the components defined as part of the architecture
– Includes the user interface, external interfaces, and internal interfaces
• Component-level design elements
– Describes the internal detail of each software component by way of data
structure definitions, algorithms, and interface specifications
• Deployment-level design elements
– Indicates how software functionality and subsystems will be allocated within
the physical computing environment that will support the software