Software Engineering: Design Concepts and Diagrams
Software Engineering: Design Concepts and Diagrams
Sukanya Basu
Sukanya Basu (Techno India University) Software Engineering June 21, 2021 1 / 45
Function-oriented design
Sukanya Basu (Techno India University) Software Engineering June 21, 2021 2 / 45
Overview of SA/SD Methodology
Sukanya Basu (Techno India University) Software Engineering June 21, 2021 3 / 45
Overview of SA/SD Methodology
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
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
Sukanya Basu (Techno India University) Software Engineering June 21, 2021 8 / 45
Data Flow Diagrams (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
Sukanya Basu (Techno India University) Software Engineering June 21, 2021 11 / 45
UML Diagrams
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
Sukanya Basu (Techno India University) Software Engineering June 21, 2021 14 / 45
Use Cases
Sukanya Basu (Techno India University) Software Engineering June 21, 2021 15 / 45
Factoring Use Cases
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
Sukanya Basu (Techno India University) Software Engineering June 21, 2021 22 / 45
Class
Sukanya Basu (Techno India University) Software Engineering June 21, 2021 23 / 45
Class Diagram: Example
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
Sukanya Basu (Techno India University) Software Engineering June 21, 2021 25 / 45
Aggregation
Sukanya Basu (Techno India University) Software Engineering June 21, 2021 26 / 45
Composition
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
Sukanya Basu (Techno India University) Software Engineering June 21, 2021 28 / 45
Example
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
Sukanya Basu (Techno India University) Software Engineering June 21, 2021 31 / 45
Sequence Diagram
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
Sukanya Basu (Techno India University) Software Engineering June 21, 2021 35 / 45
Collaboration Diagram
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
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
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
Sukanya Basu (Techno India University) Software Engineering June 21, 2021 42 / 45
Component Diagram
• Captures the physical structure of the implementation
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