CS/SE/IT1211-Software Engineering
Lecture 06
Software Design
BSc (Hons) Computer Science|Software Engineering|Information
Technology
Department of Computer Science
Faculty of Computing & Technology
Saegis Campus
Nugegoda.
Ms. Chathurangi D Weerasinghe, MSc (UCSC,Col), BSc (Ruh) Seagis Campus 1
Lecture 06
SoftwareDesign
Ms. Chathurangi D. Weerasinghe
MSc(UCSC, Col), BSc(Ruh)
Ms. Chathurangi D Weerasinghe, MSc (UCSC,Col), BSc (Ruh) Seagis Campus
SessionOutcomes
❖ What is Software design?
❖ Design Types
❖ Object Oriented Design
▪ Understand System and interactions
▪ Design System Architecture
▪ Identify main classes and objects
▪ Develop Design Models
• UML
Ms. Chathurangi D Weerasinghe, MSc (UCSC,Col), BSc (Ruh) Seagis Campus 3
Story sofar …
❖ Feasibility study
❖ Requirement phase
▪ Requirements elicitation and analysis
▪ Requirements Specification
• Use case diagrams
• Activity Diagrams
▪ Requirement validation
❖ Today’s lecture : Software Design
Ms. Chathurangi D Weerasinghe, MSc (UCSC,Col), BSc (Ruh) Seagis Campus 4
Programmer’s Approach to Software Engineering
❑Skip requirements engineering and design phases;
start writing code
Ms. Chathurangi D Weerasinghe, MSc (UCSC,Col), BSc (Ruh) Seagis Campus 5
Why this programmer’s
approach?
•Design is a waste of time
•We need to show something to the customer really quickly
•We expect or know that the schedule is too tight
Ms. Chathurangi D Weerasinghe, MSc (UCSC,Col), BSc (Ruh) Seagis Campus 6
Design ofsmalland largesystems
Ms. Chathurangi D Weerasinghe, MSc (UCSC,Col), BSc (Ruh)
Seagis Campus 7
Design ofsmalland largesystems
Ms. Chathurangi D Weerasinghe, MSc (UCSC,Col), BSc (Ruh)
Seagis Campus 8
Importance ofdesign
• Software design is an iterative process through which requirements
are translated into a “blueprint” for constructing the software.
• Design is a highly creative stage in software development where the
designer plans
• how the system or program should meet the customer’s
requirements
• how to make system effective and efficient.
Ms. Chathurangi D Weerasinghe, MSc (UCSC,Col), BSc (Ruh) Seagis Campus 9
Stages ofdesign
▪ Understand the problem
• Look at the problem from different angles to discover the design
requirements
▪ Identify one or more solutions
• Evaluate possible solutions and choose the most appropriate
▪ Describe solution abstractions
• Use graphical, formal or other descriptive notations to describe the
components of the design
▪ Repeat process for each identified abstraction until the design is expressed in
primitive terms
Ms. Chathurangi D Weerasinghe, MSc (UCSC,Col), BSc (Ruh) Seagis Campus 10
Software Designmethods
▪Function oriented software design
▪Object oriented software design
Ms. Chathurangi D Weerasinghe, MSc (UCSC,Col), BSc (Ruh) Seagis Campus 11
Software Design
Object Oriented Design
Ms. Chathurangi D Weerasinghe, MSc (UCSC,Col), BSc (Ruh)
12
Object OrientedDesign
1) Understand System and interactions
▪ Use case Diagrams
▪ Activity Diagrams
▪ Use case Scenarios
Ms. Chathurangi D Weerasinghe, MSc (UCSC,Col), BSc (Ruh) Seagis Campus 13
Object OrientedDesign
2) Design System Architecture
▪ Subsystems and communication between the subsystems.
Ms. Chathurangi D Weerasinghe, MSc (UCSC,Col), BSc (Ruh) Seagis Campus 14
Object Oriented Design
3) Identify main classes and objects
Ms. Chathurangi D Weerasinghe, MSc (UCSC,Col), BSc (Ruh)
15
Object OrientedDesign
4) Develop Design Models
▪Describing a system at a high level of abstraction
▪Design Model types
• Structural models
• Dynamic models
▪Is it necessary to model software systems?
Ms. Chathurangi D Weerasinghe, MSc (UCSC,Col), BSc (Ruh) Seagis Campus 16
What Is aModel?
A model is a simplification of reality.
Ref: Fundamentals of Visual Modeling with UML
Ms. Chathurangi D Weerasinghe, MSc (UCSC,Col), BSc (Ruh) Seagis Campus 17
The Importance ofModeling
Ref: Fundamentals of Visual Modeling with UML
Ms. Chathurangi D Weerasinghe, MSc (UCSC,Col), BSc (Ruh) Seagis Campus 18
SoftwareTeamsOftenDo Not Model
▪Many software teams build applications approaching the problem
like they were building paper airplanes
• Start coding from project requirements
• Work longer hours and create more code
• Lacks any planned architecture
• Doomed to failure
▪Modeling is a common thread to successful projects.
Ms. Chathurangi D Weerasinghe, MSc (UCSC,Col), BSc (Ruh) Seagis Campus 19
Why Do We Model?
▪Modeling achieves four aims:
▪Helps us to visualize a system as we want it to be.
▪Permits us to specify the structure or behavior of a system.
▪Gives us a template that guides us in constructing a system.
▪Documents the decisions we have made.
▪We build models to better understand the system we are developing.
Ms. Chathurangi D Weerasinghe, MSc (UCSC,Col), BSc (Ruh) Seagis Campus 20
Object OrientedDesign
4) Develop Design Models
▪Design Model types
• Structural models
• Dynamic models
▪Modelling Languages
• UML
Ms. Chathurangi D Weerasinghe, MSc (UCSC,Col), BSc (Ruh) Seagis Campus 21
What Is theUML?
▪The UML is a language for
• Visualizing
• Specifying
• Constructing
Documenting the artifacts of a software-intensive system.
Ms. Chathurangi D Weerasinghe, MSc (UCSC,Col), BSc (Ruh) Seagis Campus 22
UML -History
Ms. Chathurangi D Weerasinghe, MSc (UCSC,Col), BSc (Ruh)
Seagis Campus 23
Types of UMLdiagrams
There are different types of UML diagram, each with slightly different syntax
rules:
▪ use cases- Covered in RE
▪ activity diagrams- Covered in RE
▪ class diagrams
▪ sequence diagrams
▪ collaboration diagrams
▪ state diagrams
▪ component diagrams
▪ deployment diagrams
Ms. Chathurangi D Weerasinghe, MSc (UCSC,Col), BSc (Ruh) Seagis Campus 24
ClassDiagram
A house may have any number of pets living in it
•The two possible types of pets that can live in a house are dogs and
cats
• Each dog or cat has a name
• An animal’s house is its one and only home
• You can tell an animal to make noise and it will do its thing
Ms. Chathurangi D Weerasinghe, MSc (UCSC,Col), BSc (Ruh) Seagis Campus 25
This diagram says that
objects:
a)Persons have a name
b)Guitarists have a name
c)Guitars have a name
d)MusicPlayers have a name
Ms. Chathurangi D Weerasinghe, MSc (UCSC,Col), BSc (Ruh) Seagis Campus 26
Next Lecture?
Lecture 07 – Software Implementation
Ms. Chathurangi D Weerasinghe, MSc (UCSC,Col), BSc (Ruh) Seagis Campus 26