Software Engineering (203105303) : Shaikh Amin F.
Software Engineering (203105303) : Shaikh Amin F.
Software Engineering (203105303) : Shaikh Amin F.
Co m p o n e n t -
sc e n a r i o - b a se d f l o w- o r i e n t e d L e v e l D e si g n
e l e me nt s e l e me nt s
use-cases - text data flow diagrams
use-case diagrams control-flow diagrams
activity diagrams processing narratives
swim lane diagrams
I n t e r f a c e D e si g n
Analy sis Model
A r c h i t e c t u r a l D e si g n
c l a ss- b a se d be ha v i or a l
e l e me nt s e l e me nt s
class diagrams state diagrams
analysis packages sequence diagrams
CRC models D a t a / Cl a ss D e si g n
collaboration diagrams
Design Model
• Architecture
• Design Patterns
• Modularity
• Information Hiding
• Functional Independence
• Refinement
• Refactoring
of functionalities. Example:
Private:Fuel_machine()Set_top_speed()Develop_engine()Public:Turn_on(),
Turn_off(Accelerate(), Break()
Fundamental Concepts
• Abstraction
• Collections of data that describe data objects. Show representation data & hide
door
manufacturer
model number
type
swing direction
inserts
lights
type
number
weight
opening mechanism
open
details of enter
algorithm
• The architecture is the structure of program modules where they interact with
• Structural Properties:
• Extra-Functional Properties:
• Pattern: Each pattern describes a problem that occurs over and over multiple
times in our environment. So the solution can be used millions of times without
• The pattern simply means a repeated form or design in which the same shape is
modules.
software functions.
• Modularity simply means dividing the system or project into smaller parts to
• After developing the modules, they are integrated together to meet the software
requirements.
work easily.
Modularity: Trade-offs
cost of
software
module
integration
cost
• It is a process of elaboration.
that it does not change the external behavior of the code still improves its
internal structure.
constructed data, inappropriate data structure or any other design failure that
application.
• Advantage is that faster, low cost development and creates a high quality
software.
The Design Model
• Design modeling in software engineering represents the features of the
are used for constructing the design model. All these methods use set of design
a n a ly sis m o d e l
archit ect ure int erf ace component -level deployment -level
element s element s element s element s
Design Model Elements
Co m p o n e n t -
sc e n a r i o - b a se d f l o w- o r i e nt e d L e v e l D e si g n
e l e me nt s e l e me nt s
use-cases - text data flow diagrams
use-case diagrams control-flow diagrams
activity diagrams processing narratives
swim lane diagrams
I n t e r f a c e D e si g n
Analy sis Model
A r c h i t e c t u r a l D e si g n
c l a ss- b a se d be ha v i or a l
e l e me nt s e l e me nt s
class diagrams state diagrams
analysis packages sequence diagrams
CRC models D a t a / Cl a ss D e si g n
collaboration diagrams
Design Model
Software Design Process
• Interface design is the specification of the interaction between a system and its
environment.
• This phase proceeds at a high level of abstraction with respect to the inner
workings of the system i.e, during interface design, the internal of the systems
are completely ignored and the system is treated as a black box.
• Attention is focused on the dialogue between the target system and the users,
devices, and other systems with which it interacts.
Interface Design:
• The design problem statement produced during the problem analysis step should identify
the people, other systems, and devices which are collectively called agents.
• Interface design should include the following details:
• Precise description of events in the environment, or messages from agents to which the
system must respond.
• Precise description of the events or messages that the system must produce.
• Specification on the data, and the formats of the data coming into and going out of the
system.
• Specification of the ordering and timing relationships between incoming events or
messages, and outgoing events or outputs.
Architectural Design:
• Architectural design is the specification of the major components of a system, their
responsibilities, properties, interfaces, and the relationships and interactions between
them.
• In architectural design, the overall structure of the system is chosen, but the internal
details of major components are ignored.
Detailed Design:
• Design is the specification of the internal elements of all major system components, their
properties, relationships, processing, and often their algorithms and the data structures.
• The detailed design may include:
– Decomposition of major system components into program units.
– Allocation of functional responsibilities to units.
– User interfaces
– Unit states and state changes
– Data and control interaction between units
– Data packaging and implementation, including issues of scope and visibility of program
elements
– Algorithms and data structures
Objectives of Software Design
• 1. Correctness: Software design should be correct as per requirement.
• 2. Completeness: The design should have all components like data structures, modules, and
external interfaces, etc.
• 3. Efficiency: Resources should be used efficiently by the program.
• 4. Flexibility: Able to modify on changing needs.
• 5. Consistency: There should not be any inconsistency in the design.
• 6. Maintainability: The design should be so simple so that it can be easily maintainable by
other designers.
Objectives of Software Design
• 1. Correctness: Software design should be correct as per requirement.
• 2. Completeness: The design should have all components like data structures, modules, and
external interfaces, etc.
• 3. Efficiency: Resources should be used efficiently by the program.
• 4. Flexibility: Able to modify on changing needs.
• 5. Consistency: There should not be any inconsistency in the design.
• 6. Maintainability: The design should be so simple so that it can be easily maintainable by
other designers.
UI Design
Easy to learn?
Easy to use?
Easy to understand?
Interface Design
Typical Design
Errors
• lack of consistency
• too much memorization
• no guidance / help
• no context sensitivity
• poor response
• Unfriendly
User Interface Design Process
Interface Analysis
– What tasks and subtasks will be performed as the user does the work?
– What specific problem domain objects will the user manipulate as work is
performed?
• Response time
• Help facilities
• Error handling
• Application accessibility
Mapping User Objectives
Menu bar
major functions
object ive #n
Navigation
menu
Architectural Design – Software Engineering
• The software needs an architectural design to represent the design of the
software. IEEE defines architectural design as
“the process of defining a collection of hardware and software
components and their interfaces to establish the framework for the development of
a computer system.”
• The software that is built for computer-based systems can exhibit one of these
many architectural styles.
Need of Architecture?
The architecture is not the operational software. Rather, it is a representation that
enables a software engineer to:
(1) analyze the effectiveness of the design in meeting its stated requirements,
(3) reduce the risks associated with the construction of the software.
Architectural Design – Software Engineering
• System Category Consists of
– A set of components(eg: a database, computational modules) that will
perform a function required by the system.
– The set of connectors will help in coordination, communication, and
cooperation between the components.
– Conditions that how components can be integrated to form the system.
– Semantic models that help the designer to understand the overall
properties of the system.
Architectural Styles
Each style describes a system category that encompasses:
(3) Constraints that define how components can be integrated to form the system, and
(4) Semantic models that enable a designer to understand the overall properties of a
system by analyzing the known properties of its constituent parts.
Various Architectures
• Data-centered architectures
• Data flow architectures
• Call and return architectures
• Object-oriented architectures
• Layered architectures
Data centered architectures:
• A data store will reside at the center of this architecture and is accessed
frequently by the other components that update, add, delete, or modify the
data present within the store.
• The figure illustrates a typical data-centered style.
• The client software accesses a central repository. Variations of this approach are
used to transform the repository into a blackboard when data related to the client
or data of interest for the client change the notifications to client software.
Data-Centered Architecture
Data centered architectures:
• This data-centered architecture will promote integrability. This means that the
existing components can be changed and new client components can be added to
the architecture without the permission or concern of other clients.
• Data can be passed among clients using the blackboard mechanism.
Data centered architectures:
• Advantages of Data centered architecture:
– Repository of data is independent of clients
– Client work independent of each other
– It may be simple to add additional clients.
– Modification can be very easy
Data flow architectures:
• This kind of architecture is used when
input data is transformed into output
data through a series of
computational manipulative
components.
• The figure represents pipe-and-filter
architecture since it uses both pipe
and filter and it has a set of
components called filters connected by
lines.
Data flow architectures:
• Pipes are used to transmitting data from one component to the next.
• Each filter will work independently and is designed to take data input of a certain
form and produces data output to the next filter of a specified form.
• The filters don’t require any knowledge of the working of neighboring filters.
• High coupling and low cohesion can make a system difficult to change
and test,
• while low coupling and high cohesion make a system easier to maintain
and improve.
Coupling Types
• Data Coupling: If the dependency between the
modules is based on the fact that they
communicate by passing only data, then the
modules are said to be data coupled. In data
coupling, the components are independent of
each other and communicate through data.
Module communications don’t contain tramp
data. Example-customer billing system.
Coupling Types
• Data Coupling: If the dependency between the modules is
based on the fact that they communicate by passing only data,
then the modules are said to be data coupled. In data coupling,
the components are independent of each other and
communicate through data. Module communications don’t
contain tramp data. Example-customer billing system.
Coupling Types
• Stamp Coupling In stamp coupling, the complete data
structure is passed from one module to another module.
• Control Coupling: If the modules communicate by passing
control information, then they are said to be control coupled.
• External Coupling: In external coupling, the modules depend
on other modules, external to the software being developed or
to a particular type of hardware. Ex- protocol, external file,
device format, etc.
Coupling Types
• Common Coupling: The modules have shared data such as
global data structures. The changes in global data mean
tracing back to all modules which access that data to evaluate
the effect of the change.
• So it has got disadvantages like difficulty in reusing modules,
reduced ability to control data accesses, and reduced
maintainability.
Coupling Types
• Content Coupling: In a content coupling, one module can
modify the data of another module, or control flow is passed
from one module to the other module.
• This is the worst form of coupling and should be avoided.
Cohesion Types
• Functional Cohesion: Every essential
element for a single computation is
contained in the component.
• A functional cohesion performs the task
and functions. It is an ideal situation.
Cohesion Types
• Sequential Cohesion: An element outputs some data that
becomes the input for other element, i.e., data flow between
the parts.
• It occurs naturally in functional programming languages.
Cohesion Types
• Communicational Cohesion: Two elements operate on the
same input data or contribute towards the same output data.
• Update record in the database and send it to the printer.
• Procedural Cohesion: Elements of procedural cohesion ensure
the order of execution. Actions are still weakly connected and
unlikely to be reusable. Ex- calculate student GPA, print student
record, calculate cumulative GPA, print cumulative GPA.
Cohesion Types
• Temporal Cohesion: The elements are related by their timing
involved.
• A module connected with temporal cohesion all the tasks must
be executed in the same time span.
• This cohesion contains the code for initializing all the parts of
the system. Lots of different activities occur, all at unit time.
Cohesion Types
• Logical Cohesion: The elements are logically related and not
functionally. Ex- A component reads inputs from tape, disk, and
network. All the code for these functions is in the same
component. Operations are related, but the functions are
significantly different.
Cohesion Types
• Coincidental Cohesion: The elements are not
related(unrelated).
• The elements have no conceptual relationship other than
location in source code. It is accidental and the worst form of
cohesion.
Cohesion Types
• Procedural Cohesion: This type of cohesion occurs when
elements or tasks are grouped together in a module based on
their sequence of execution, such as a module that performs a
set of related procedures in a specific order.
• Procedural cohesion can be found in structured programming
languages.
Various Approaches of Partitioning
• If the system is having hierarchical architecture, the program
structure can easily be partitioned both horizontally and
vertically, figure (a), represents this view.
Various Approaches of Partitioning
• In given figure, horizontal
division defines the
individual branches of the
modular hierarchy for
every major program
function.
Various Approaches of Partitioning
• Control modular (shown by
rectangles) are used to
coordinate communication
between tasks. The three
partitions are done in simple
horizontal partitions i.e.,
input, data transformation
(processing) and output.
Various Approaches of Partitioning
The following benefits are provided by horizontal partitioning –
control
panel target system: surveillance
Security Fun ction function
uses
homeowner peers
uses
uses
sensors sensors
Component Structure
SafeHome
Execut ive
Funct ion
select ion
Ext ernal
Communicat ion
Management
Ext er nal
Communic at ion
Management
Securit y
Co n t ro l d e t e ct o r alarm
p an e l m an ag e m e n t p ro ce ssin g
p ro ce ssin g
Ke y p ad
p ro ce ssin g phone
sch e d u le r
co m m u n icat io n
CP d isp lay
fu n ct io n s
alarm
sen
se nso
sorr
se
se
se nn so
so rr
se
se nnsosorr
se nn so
so rr
se n so r
CLASS ELABORATION
CBSE Activities
• Component-Based Software Engineering (CBSE) is a process
that focuses on the design and development of computer-
based systems with the use of reusable software components.
• It not only identifies candidate components but also qualifies
each component’s interface, adapts components to remove
architectural mismatches, assembles components into a
selected architectural style, and updates components as
requirements for the system change.
Component-based development:
• Component-based development (CBD) is a CBSE activity that
occurs in parallel with domain engineering.
• Using analysis and architectural design methods, the software
team refines an architectural style that is appropriate for the
analysis model created for the application to be built.
CBSE Framework Activities:
• Component Qualification: This activity ensures that the system
architecture defines the requirements of the components for
becoming a reusable components. Reusable components are
generally identified through the traits in their interfaces. It
means “the services that are given and the means by which
customers or consumers access these services ” are defined as
a part of the component interface.
CBSE Framework Activities:
• Component Adaptation: This activity ensures that the
architecture defines the design conditions for all components
and identifies their modes of connection. In some cases,
existing reusable components may not be allowed to get used
due to the architecture’s design rules and conditions. These
components should adapt and meet the requirements of the
architecture or be refused and replaced by other, more
suitable components.
CBSE Framework Activities:
• Component Composition: This activity ensures that the
Architectural style of the system integrates the software
components and forms a working system.
• By identifying the connection and coordination mechanisms of
the system, the architecture describes the composition of the
end product.
CBSE Framework Activities:
• Component Update: This activity ensures the updation of
reusable components.
• Sometimes, updates are complicated due to the inclusion of
third-party (the organization that developed the reusable
component may be outside the immediate control of the
software engineering organization accessing the component
currently).
OO Design Concepts
• Object-Oriented Analysis and Design (OOAD) is a software
engineering methodology that employs object-oriented
principles to model and design complex systems.
• It involves analyzing the problem domain, representing it using
objects and their interactions, and then designing a modular
and scalable solution. It helps create systems that are easier to
understand, maintain, and extend by organizing functionality
into reusable and interconnected components.
Important Aspects of OOAD
• Object-Oriented Programming: Object-oriented programming
involves modeling real-world objects as software objects, with
properties and methods that represent the behavior of those
objects. OOAD uses this approach to design and implement software
systems.
• Design Patterns: Design patterns are reusable solutions to common
problems in software design. OOAD uses design patterns to help
developers create more maintainable and efficient software systems.
Important Aspects of OOAD
• UML Diagrams: Unified Modeling Language (UML) is a standardized
notation for creating diagrams that represent different aspects of a
software system.
• OOAD uses UML diagrams to represent the different components
and interactions of a software system.
What is UML?
• Unified Modeling Language (UML) is a standardized visual modeling
language used in the field of software engineering to provide a
general-purpose, developmental, and intuitive way to visualize the
design of a system.
• UML helps in specifying, visualizing, constructing, and documenting
the artifacts of software systems.
What is UML?
• We use UML diagrams to portray the behavior and structure of a
system.
• UML helps software engineers, businessmen, and system architects
with modeling, design, and analysis.
Different Types of UML Diagrams
Class Diagram
• The most widely use UML diagram is the class diagram.
• It is the building block of all object oriented software systems.
• We use class diagrams to depict the static structure of a system by
showing system’s classes, their methods and attributes.
• Class diagrams also help us identify relationship between different
classes or objects.
Class Diagram
Composite Structure Diagram
• It represents the internal structure of a class and its interaction points
with other parts of the system.
• A use case diagram gives us a high level view of what the system or a
part of the system does without going into implementation details.
Use Case Diagrams
Activity Diagrams
• We use Activity Diagrams to illustrate the flow of control in a system.
• We can also use an activity diagram to refer to the steps involved in
the execution of a use case.
• We basically depict workflows visually using an activity diagram.
• An activity diagram focuses on condition of flow and the sequence in
which it happens.
• We describe or depict what causes a particular event using an
activity diagram.
Activity Diagrams
Sequence Diagram
• A sequence diagram simply depicts interaction between objects in a
sequential order i.e. the order in which these interactions take
place.
• We can also use the terms event diagrams or event scenarios to
refer to a sequence diagram.
• Sequence diagrams describe how and in what order the objects in a
system function.
• These diagrams are widely used by businessmen and software
developers to document and understand requirements for new and
existing systems.
Sequence Diagram
Important Aspects of OOAD
• Use Cases: Use cases are a way of describing the different ways in
which users interact with a software system.
• OOAD uses use cases to help developers understand the
requirements of a system and to design software systems that meet
those requirements.
OOAD
Design Classes
SensorManagement
Sensor
Deployment Elements
Local or Specific Attribute- some additional set of that differentiate them from
each other.
TEXTBOOK may have additional attribute Subject( computer , maths ,
science ctc
Cont....
Generalization
external entity
process
data flow
data store
External Entity
base
compute
area
triangle
height area
Data Stores
•Review user scenarios and/or the data model to isolate data objects and use a
grammatical parse to determine “operations”
Processing
User request Requested
video
Digital signal
video Monitor
processor
Video
source NTSC
video signal
Constructing a DFD—II
a b
x P y level 0
c p2
a f
p1
p4 b
d 5
p3 e g
level 1
Data Dictionary
•The data dictionary is a reference work of data about data (that is,
metadata), one that is compiled by systems analysts to guide them through
analysis and design.
•Data flow diagrams are an excellent starting point for collecting data
dictionary entries.
Data Dictionary (Cont.)
• References:
Data Dictionary Example