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

Software Engineering: Design Concepts and Diagrams

The document discusses software engineering design concepts and diagrams, including function-oriented design, the structured analysis/design (SA/SD) methodology, functional decomposition, data flow diagrams, the unified modeling language (UML), use case modeling, class diagrams, associations, aggregations, and compositions. It provides an overview of these topics at a high level and includes examples to illustrate key concepts and diagram types.
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)
85 views

Software Engineering: Design Concepts and Diagrams

The document discusses software engineering design concepts and diagrams, including function-oriented design, the structured analysis/design (SA/SD) methodology, functional decomposition, data flow diagrams, the unified modeling language (UML), use case modeling, class diagrams, associations, aggregations, and compositions. It provides an overview of these topics at a high level and includes examples to illustrate key concepts and diagram types.
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/ 45

Software Engineering

Design Concepts and Diagrams

Sukanya Basu

Computer Science and Engineering Department

Techno India University

June 21, 2021

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 1 / 45
Function-oriented design

• Function-oriented design techniques are very popular


• Currently in use in many software development organizations
• Function-oriented design techniques
• Start with the functional requirements specified in the SRS document
• During the design process
• High-level functions are successively decomposed into more detailed functions
• Finally the detailed functions are mapped to a module structure
• Successive decomposition of high-level functions
• Into more detailed functions
• Technically known as top-down decomposition

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 2 / 45
Overview of SA/SD Methodology

• SA/SD methodology consists of two distinct activities


• Structured Analysis (SA)
• Structured Design (SD)
• During structured analysis
• functional decomposition takes place
• During structured design
• module structure is formalized

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 3 / 45
Overview of SA/SD Methodology

• SA/SD methodology consists of two distinct activities


• Structured Analysis (SA)
• Structured Design (SD)
• During structured analysis
• functional decomposition takes place
• During structured design
• module structure is formalized

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 4 / 45
Functional Decomposition
• Each function is analyzed
• Hierarchically decomposed into more detailed functions
• Simultaneous decomposition of high-level data into more detailed data

Structured Analysis
• Transforms a textual problem description into a graphic model
• Done using data flow diagrams (DFDs)
• DFDs graphically represent the results of structured analysis

Structured Design
• All the functions represented in the DFD
• Mapped to a module structure
• The module structure
• Also called as the software architecture

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 5 / 45
Structured Analysis vs. Structured Design

• Structured Analysis vs. Structured Design


• Capture the detailed structure of the system as the user views it
• Purpose of structured design
• Arrive at a form that is suitable for implementation in some programming
language
• The results of structured analysis can be easily understood even by ordinary
customers
• Does not require computer knowledge
• Directly represents customer’s perception of the problem
• Uses customer’s terminology for naming different functions and data
• The results of structured analysis can be reviewed by customers
• To check whether it captures all their requirements

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 6 / 45
Structured Analysis

Based on principles of
• Top-down decomposition approach
• Divide and conquer principle
• Each function is considered individually (i.e. isolated from other functions)
• Decompose functions totally disregarding what happens in other functions
• Graphical representation of results using
• Data flow diagrams (or bubble charts)

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 7 / 45
Data Flow Diagrams

• DFD is an elegant modelling technique


• Useful not only to represent the results of structured analysis
• Applicable to other areas also
• e.g. for showing the flow of documents or items in an organization
• DFD technique is very popular
• It is powerful and yet simple to understand and use
• DFD is a hierarchical graphical model
• Shows the different functions (or processes) of the system and
• Data interchange among the processes
• It is useful to consider each function as a processing station
• Each function consumes some input data
• Produces some output data

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 8 / 45
Data Flow Diagrams (DFDs)

Primitive Symbols Used for Constructing DFDs

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 9 / 45
Data Flow Model of a Car Assembly Unit

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 10 / 45
Object Modelling Using UML

What is a model?
• A model is an abstraction mechanism
• Capture only important aspects and ignores the rest
• Different models result when different aspects are ignored
• An effective mechanism to handle complexity

Why are UML Models Required?


• UML is a graphical modelling tool
• Easy to understand and construct

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 11 / 45
UML Diagrams

• Nine diagrams are used to capture different views of a system


• Views provide different perspectives of a software system
• Users’ view
• Structural view
• Behavioral view
• Implementation view
• Environmental view
• Diagrams can be refined to get the actual implementation of a system

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 12 / 45
UML Diagrams

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 13 / 45
Use Case Model

• Consists of set of “use cases”


• An important analysis and design artifact
• The central model
• Other models must confirm to this model
• Not really an object-oriented model
• Represents a functional or process model

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 14 / 45
Use Cases

• Different ways in which a system can be used by the users


• Corresponds to the high-level requirements

• Defines external behavior without revealing internal structure of system


• Set of related scenarios tied together by a common goal

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 15 / 45
Factoring Use Cases

• Two main reasons for factoring


• Complex use cases need to be factored into simpler use cases
• To represent common behavior across different use cases
• Three ways of factoring
• Generalization
• Includes
• Extends

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 16 / 45
Factoring Use Cases Using Generalization

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 17 / 45
Factoring Use Cases Using Includes

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 18 / 45
Factoring Use Cases Using Extends

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 19 / 45
Hierarchical Organization of Use Cases

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 20 / 45
Use Case Packaging

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 21 / 45
Class Diagram

• Describes static structure of a system


• Main constituents are classes and their relationships
• Generalization
• Aggregation
• Association
• Various kinds of dependencies
• Entities with attributes and operations
• Classes are represented as solid outline rectangle with compartments
• Compartments for name, attributes, and operations
• Attribute and operation compartments are optional depending on the purpose
of a diagram

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 22 / 45
Class

• Template for object creation


• Instances are objects
• Considered as aabstract data type (ADT)
• Examples: Employees, Books, etc.
• Sometimes not intended to produce instances
- Abstract classes

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 23 / 45
Class Diagram: Example

Different representations of the LibraryMember class

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 24 / 45
Association
• A common relation among classes
• When two classes are associated, they can invoke each others’ methods

• Association can be unary, binary, ternary or n-ary in general

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 25 / 45
Aggregation

• Special type of association relation


• Represents a whole-part relationship
• Represented by a diamond symbol at the composite end

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 26 / 45
Composition

• Stricter form of aggregation


• Lifeline of the whole and part are identical
• When the whole is created, parts are created
• When the whole is destroyed, parts are destroyed
• Represented by a filled diamond at the composite end

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 27 / 45
Object Diagrams
• During execution, object may be dynamically created and destroyed
• Object diagram shows a snapshotof the objects in a system at a point of time

Different representations of the LibraryMember object

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 28 / 45
Example

Classes in the Mentcare System

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 29 / 45
Example
Class diagram of Mentcare System

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 30 / 45
Interaction Diagram

• Models how groups of objects collaborate to realize some behaviour


• Typically each interaction diagram realizes behaviour of a single use case
• Two kinds: Sequence and Collaboration diagrams
• Two diagrams are equivalent
• Portray different perspectives
• These diagrams play a very important role in the design process

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 31 / 45
Sequence Diagram

• Shows interaction among objects as a two-dimensional chart


• Objects are shown as boxes at top
• If object created during execution then shown at appropriate place
• Objects existence are shown as dashed lines (lifeline)
• Objects activeness, shown as a rectangle on lifeline
• Messages are shown as arrows
• Each message labelled with corresponding message name
• Each message can be labelled with some control information
• Two types of control information
• condition ([ ])
• iteration (∗ )

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 32 / 45
Elements of a Sequence Diagram

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 33 / 45
Example: Sequence Diagram

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 34 / 45
Example: Sequence Diagram

Sequence Diagram for the renew book use case

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 35 / 45
Collaboration Diagram

• Shows both structural and behavioural aspects


• Objects are collaborators, shown as boxes
• Messages between objects shown as a solid line
• A message is shown as a labelled arrow placed near the link
• Messages are prefixed with sequence numbers to show relative sequencing

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 36 / 45
Example: Collaboration Diagram
Collaboration diagram for the renew book use case

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 37 / 45
Activity Diagram

• Not present in earlier modelling techniques


• Represents processing activity, may not correspond to methods
• Activity is a state with an internal action and one/many outgoing transitions
• Somewhat related to flowcharts
• Normally employed in business process modelling
• Carried out during requirements analysis and specification stage
• Can be used to develop interaction diagrams

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 38 / 45
Example: Activity Diagram
Activity diagram for student admission procedure at IIT

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 39 / 45
State Chart Diagram

• Model how the state of an object changes in its lifetime


• Based on finite state machine (FSM) formalism
• Hierarchical model of a system
• Represents composite nested states
• Elements of state chart diagram
• Initial State: A filled circle
• Final State: A filled circle inside a larger circle
• State: Rectangle with rounded corners
• Transitions: Arrow between states, also boolean logic condition (guard)

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 40 / 45
Example: State Chart Diagram
State chart diagram for an order object

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 41 / 45
Package Diagrams

• A package is a grouping of several classes


• Package diagrams show module dependencies
• Useful for large projects with multiple binary files

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 42 / 45
Component Diagram
• Captures the physical structure of the implementation

• Built as part of architectural specification


• Purpose
• Organize source code
• Construct an executable release
• Specify a physical database
• Developed by architects and programmers
Sukanya Basu (Techno India University) Software Engineering June 21, 2021 43 / 45
Deployment Diagram
• Captures the topology of a system’s hardware

Sukanya Basu (Techno India University) Software Engineering June 21, 2021 44 / 45
UML 2.0
• UML 2.0 defines 13 kinds of diagrams
• Two important enhancements
• Combined fragments in sequence diagrams

• Composite structure diagram


Sukanya Basu (Techno India University) Software Engineering June 21, 2021 45 / 45

You might also like