Professional Documents
Culture Documents
Engineering
(CoSc3092)
Sem. II – 2020
Department of Computer Science
Introduction
software engineering
The
Theterm
term software
softwareengineering
engineeringwas was coined
coinedin in1968
1968asasaa
response
response to to the
the desolate
desolate state
state of
of the
the art
art of
of developing
developing
quality
quality software
softwareon on time
timeand andwithin
withinbudget.
budget.
Software
Software developers
developers were were not
not able
able to
to set
set concrete
concrete
objectives,
objectives, predict
predict the the resources
resources necessary
necessary to to attain
attain
those
those objectives,
objectives, and and manage
manage the the customers’
customers’
expectations.
expectations...
More
More often
often than
than not,
not, the
the moon
moon waswas promised,
promised, aa lunar
lunar
rover
roverbuilt,and
built,andaapair
pair ofofsquare
squarewheels
wheelsdelivered.
delivered.
The
The emphasis
emphasis in in software
software engineering
engineering isis on on both
both
words,
words, software
softwareandandengineering.
engineering.
Introduction
Software engineering
An
Anengineer
engineerisisable
abletotobuild
buildaahigh-quality
high-qualityproduct
productusing
using
off-the-shelf
off-the-shelf components
components and and integrating
integrating them
them under
under
time
timeand
and budget
budget constraints.
constraints.
The
The engineer
engineer isis often
often faced
faced with
with ill-defined
ill-defined problems,
problems,
partial
partial solutions,
solutions, and
and has
has to
to rely
rely on
on empirical
empirical methods
methods to
to
evaluate
evaluatesolutions.
solutions.
Useful
Usefulsoftware
softwaresystems
systemsare arecomplex
complexand andchange.
change.
Introduction
what is software engineering? SW eng. is
aa modeling
modeling activity:
activity: deal
deal with
with complexity
complexity through
through
modeling,
modeling, by by focusing
focusing at at any
any one
one time
time onon only
only the
the
relevant
relevantdetails
detailsand
andignoring
ignoringeverything
everythingelse.
else...
aa problem-solving
problem-solving activity:
activity: Models
Models are are used
used to to
search
search forfor an
an acceptable
acceptable solution.
solution. This
This search
search isis
driven
drivenby byexperimentation
experimentation
aa knowledge
knowledge acquisition
acquisition activity:
activity: In
In modeling
modeling the the
application
application and
and solution
solution domain
domain ,, software
software engineers
engineers
collect
collect data,
data, organize
organize itit into
into information,
information, andand formalize
formalize
ititinto
intoknowledge.
knowledge.
aa rationale-driven
rationale-driven activity:
activity: WhenWhen acquiring
acquiring
knowledge
knowledge and and making
making decisions
decisions about
about thethe system
system or or
its
its application
application domain,
domain, software
software engineers
engineers alsoalso need
need
toto capture
capture the
the context
context in in which
which decisions
decisions werewere made
made
Introduction
System Development (SD)
SD
SD refers
refers toto all
all activities
activities that
that go
go into
into producing
producing an an
information
information systems
systems solution.
solution. These
These activities
activities consist
consist ofof
systems
systems analysis,
analysis, modeling,
modeling, design,
design, implementation,
implementation,
testing
testingandandmaintenance.
maintenance.
AA software
software development
development methodology
methodology isis aa seriesseries of of
processes
processes thatthat ifif followed
followed can
can lead
lead to
to the
the development
development of of
an
anapplication.
application.
There
There areare two
two orthogonal
orthogonal views views of
of the
the software
software differs
differs in
in
their
their primary
primaryfocus.
focus.
1.
1. The
Thetraditional
traditionalapproach
approachfocuses
focuseson onthe
thefunctions
functionsof ofthe
the
system
system andandsays
sayssoftware
softwareas asaacollection
collectionof ofprograms
programs(or (or
functions)
functions)and andisolated
isolateddata.data.
2.
2.Object
Objectoriented
orientedsystems
systemsdevelopment
development centers
centerson onthethe
object,
object, which
whichcombines
combinesdata dataand
andfunctionality
functionalityi.e.,
i.e.,
Introduction
Object Oriented System Development Methodology
isis aa way
way to
to develop
develop software
software byby building
building self
self –– contained
contained
modules
modules or or objects
objects that
that can
can be
be easily
easily replaced,
replaced, modified
modified
and
andreused.
reused.
InIn an an object–oriented
object–oriented environment,
environment, software
software isis aa
collection
collection ofof discrete
discrete objects
objects that
that encapsulate
encapsulate their their data
data
asas well
well as
as the
the functionality
functionality of
of model
model real–world
real–world events
events
“objects”.
“objects”.
Introduction
Why Object Oriented?
An
An object
object orientation
orientation produces
produces systems
systems thatthat are
are easier
easier toto
evolve,
evolve, more
more flexible,
flexible, more
more robust,
robust, and
and more
more reusable
reusable than
than aa
top
top––down
downapproach,
approach,
Allows
Allows higher
higher levellevel of of abstraction:
abstraction: SinceSince objects
objects
encapsulate
encapsulate bothboth data
data (attributes)
(attributes) && functions
functions (methods),
(methods),
they
theywork
workatataahigher
higherlevel
levelofof abstraction.
abstraction.
Provides
Provides Seamless
Seamless transition
transition among
among different
different phases
phases of of
software
software development:
development: uses uses the
the same
same language
language toto talk
talk
about
aboutanalysis,
analysis, design,
design,programming
programmingand anddatabase
database design.
design.
Encourage
Encourage good good development
development techniques:
techniques: the the classes
classes
will
will be
be grouped
grouped intointo subsystems
subsystems but but remain
remain independently
independently
and
and therefore,
therefore, changing
changing one one class
class has
has nono impact
impact on
on other
other
classes
classesand
andso,so, the
theimpact
impactisisminimized.
minimized.
Promotes of reusability: Objects are reusable because
An Overview of UML
What is modeling?
Modeling
Modelingconsists
consistsofofbuilding
buildingan
anabstraction
abstractionofofreality.
reality.
Abstractions
Abstractionsare aresimplifications
simplificationsbecause:
because:
They
They ignore
ignore irrelevant
irrelevantdetails
detailsand
and
They
They only
onlyrepresent
representthe therelevant
relevantdetails.
details.
What
What isis relevant
relevant oror irrelevant
irrelevant depends
depends on
on the
the purpose
purpose
of
of the
themodel.
model.
An Overview of UML
Why model software?
Software
Softwareisisgetting
gettingincreasingly
increasinglymore
morecomplex
complex
Windows
WindowsXP XP>> 40
40mio
miolines
linesof
of code
code
AAsingle
singleprogrammer
programmer cannot
cannotmanage
managethisthisamount
amount
of
of code
codeinin its
itsentirety.
entirety.
Code
Code isis not
not easily
easily understandable
understandable by by developers
developers who
who
did
didnot
notwrite
writeitit
We
Weneed
needsimpler
simpler representations
representationsforfor complex
complexsystems
systems
Modeling
Modelingisisaamean
meanforfordealing
dealingwith
withcomplexity
complexity
An Overview of UML
Why model software?
Once
Once models
models of of aa system
system havehave been
been constructed,
constructed,
these
these can
can bebe used
used for
for aa variety
variety of
of purposes
purposes during
during
software
softwaredevelopment,
development, including
including ::
••Analysis
Analysis ••Specification
Specification ••Code
Codegeneration
generation ••Design
Design ••
Visualize
Visualizeand
and understand
understand the the problem
problemandandthe
theworking
working
of
of aasystem
system ••Testing,
Testing, etc.
etc.
The
The UML
UML models
models cancan not
not only
only be
be used
used to
to document
document
the
theresults
resultsbut
but also
alsototoarrive
arriveat
at the
theresults
resultsthemselves
themselves
An Overview of UML
What is UML?
UML (Unified Modeling Language)
An emerging standard for modeling object-oriented software.
Resulted from the convergence of notations from three leading
object-oriented methods:
OMT (Object Management Technology James Rumbaugh)
OOSE (Ivar Jacobson)
Booch (Grady Booch)
UML
UML maymay be be used
used to
to visualize,
visualize, specify,
specify, construct,
construct, and
and
document
documentthe theartifacts
artifactsofofaasoftware
softwaresystem
system
ItIt provides
provides aa set set of
of notations
notations (e.g.
(e.g. rectangles,
rectangles, lines,
lines,
ellipses,
ellipses,etc.)
etc.)to
tocreate
createaavisual
visualmodel
modelof ofthe
thesystem
system
Like
Like any
any other
other language,
language, UMLUML has has its
its own
own syntax
syntax
(symbols
(symbols andand sentence
sentence formation
formation rules)
rules) and
and semantics
semantics
(meanings
(meaningsof ofsymbols
symbolsand andsentences)
sentences)
UML
UML isis not not aa system
system design
design or or development
development
methodology,
methodology, but but can
can bebe used
used toto document
document object-
object-
oriented
oriented andand analysis
analysis results
results obtained
obtained usingusing some
some
methodology..
methodology
Building Blocks of the UML
UML Core Conventions
Rectangles are classes or instances
Ovals are functions or use cases
Instances are denoted with an underlined names
myWatch:SimpleWatch
Joe:Firefighter
UML
UML can
canbebeused
usedtoto construct
constructnine
nine different
differenttypes
typesofofdiagrams
diagramsto to
capture
capturefive
fivedifferent
differentviews
viewsofofaasystem
system
The
The UML
UML diagrams
diagrams can can capture
capture the
the following
following five
five views
views of
of aa
system:
system:
User’s
User’sview
view
Structural
Structuralview
view
Behavioral
Behavioralviewview
Implementation
Implementationview view
Environmental
Environmentalview view
Diagrams in the UML
Use case Diagrams
Describe the functional behavior of the system as seen by the user.
Class diagrams
Describe the static structure of the system: Objects, Attributes,
Associations
Sequence diagrams
Describe the dynamic behavior between actors and the system and
between objects of the system
Statechart diagrams
Describe the dynamic behavior of an individual object (essentially
a finite state automaton)
Activity Diagrams
Model the dynamic behavior of a system, in particular the
workflow (essentially a flowchart)
Implementation diagrams
Component diagrams
Deployment diagrams
Use Case Diagrams
Use
Use cases
cases are are used
used during
during requirements
requirements
elicitation
elicitation and
and analysis
analysis to to represent
represent the
the
functionality
functionality of
of the
the system
system
use
use cases
cases represent
represent thethe different
different ways
ways in
in which
which aa
system
system cancan be
be used
used by
by the
the users
users
AA simple
simple way
way to to find
find all
all the
the use
use cases
cases of
of aa
system
system is is to
to ask
ask the the question:
question: “What
“What the
the
users
users can
can do
do using
using the the system?”
system?”
It represent
It represent the
the functionality
functionality of of the
the system
system
from
from aa user’s
user’s point
point of of view.
view. They
They define
define the
the
boundaries
boundaries of of the
the system
system
Use Case Diagrams
Cancel NoChange
The <<includes>> Relationship
<<includes>> relationship
represents behavior that is
Passenger factored out of the use case.
identifying commonalities in
different use cases
PurchaseMultiCard
<<includes>> behavior is
PurchaseSingleTicket factored out for reuse, not
<<includes>> because it is an exception.
<<includes>> The direction of a
<<includes>> relationship is to
the using use case (unlike
CollectMoney <<extends>> relationships).
<<extends>> <<extends>>
NoChange Cancel
Use Case Diagrams: Summary
Use case diagrams represent external behavior
Use case diagrams are useful as an index into the use cases
Use case descriptions provide meat of model, not the use
case diagrams.
All use cases need to be described for the model to be
useful.
Class Diagrams
Class diagrams describe the structure of the
system in terms of classes and objects
A class is a definition of objects that share the
same properties, relationships and behavior.
An object is an instance of a class.
The properties of a class are called
attributes and the behavior is expressed
in operations.
Class Diagrams
Classes are the most important building block of any
object-oriented system ClassName
attributes
operations
Classes are used to: -
capture the vocabulary of the system you are developing
represent software things, hardware things, and even things that
are purely conceptual
Well-structured classes have crisp/distinct
boundaries and form a part of a balanced
distribution of responsibilities across the system
Class Diagrams
TarifSchedule
Table zone2price
Enumeration getZones()
Name Price getPrice(Zone)
TarifSchedule
zone2price Attributes Signature
getZones()
getPrice()
Operations TarifSchedule
tarif_1974:TarifSchedule
zone2price = {
{‘1’, .20},
{‘2’, .40},
{‘3’, .60}}
name:String name:String
One-to-one association
Point
Polygon
* x: Integer
y: Integer
draw()
One-to-many association
Class Diagrams/ Relationships
Association/
Association/ multiplicity
multiplicity
Many-to-Many Associations
Lists
StockExchange * * Company
tickerSymbol
Class Diagrams/ Relationships
Generalization
A generalization is a relationship
between a general thing (superclass
or parent) and a more specific kind of
that thing (subclass or child)
Generalization means that objects of
the child may be used anywhere the
parent may appear, but not the reverse
the child is substitutable for the parent
33
Class Diagrams/ Relationships
Cont…
Graphically, a generalization is rendered as a
solid directed line with a large open arrowhead,
pointing to the parent
ParentClass
ChildClass
attributes
operations
34
Class Diagrams/ Relationships
Example: - The Rectangle, Circle and Polygon
classes inherits the attributes and operations of
the Shape class
Shape
origin
move()
resize()
display()
Company
whole 1
aggregation
part *
Department
36
A simple example
On-line Bookstore Review
a web application that can be accessed by the store’s
registered customer, whereby each customer can review
one or more books sold in the book store
The process given: -
Each registered CUSTOMER has an ACCOUNT that is used to
verify his/her ID and password
Each PASSWORD entered must be more than 8 characters and
consists of a combination of text and numbers
Each registered CUSTOMER, upon ACCOUNT verification, can
REVIEW one or more BOOKs based on its title
A REVIEW can either be a customer’s review and editor’s review
3
7
Things that are found in the problem: -
Account
Password
Customer
Book
Review
can be divided into CustomerReview and
EditorialReview
3
8
Cont…
Each of these things can form individual
classes with responsibilities (attributes and operation)
Account
Used to keep the customer’s ID and password
for verifying that the customer is a registered
customer
Also keeps additional information, i.e. e-mail
address
The password is of the type PASSWORD
3
9
Password
Used to check that the password entered is valid (more
than 8 characters and consists of combination of text and
numbers)
Customer
Used to keep information about the customer, such as
customer’s name, ID, address etc
Book
Used to keep the relevant information on the book that is
crucial to customer’s review, i.e. book title, author, rating
4
0
Cont…
Review
Divided into sub-classes: CustomerReview and
EditorialReview
CustomerReview
Used to assign ratings to book reviewed (with 1
being the lowest and 5 the highest) by customer
Used to compute the average rating for each book
that has been reviewed by customer
EditorialReview
Used to store editor’s review
4
1
Translate the responsibilities for each class into attributes and
operations needed to perform those responsibilities (relevant to the
given problem)
Account
Attributes:emailAddress(string),
ID(string), passwd(Password)
Operations: verifyPassword(p: Password)
Password
Attributes:passwd(string)
Operations: checkPassword()
Customer
Attributes:CustName, CustAddress, CustID etc
Operations: NONE
Can choose not to show the attributes when modeling the class
as they are not relevant to the given problem (put NONE for
both)
Book
Attributes:title, author, rating
4 Operations : NONE
2
Review
Attributes: NONE
Operations: NONE
CustomerReview
Attributes: NONE
Operations: NONE
4
3
The relationship between classes: -
Dependency
The operation verifyPassword in Account class
has as parameter a Password class
Therefore, Account depends on Password
Generalization
Review can be divided into customer’s review
and editor’s review
Therefore, CustomerReview and
EditorialReview is the subclass of Review
4
4
Association
A customer can open 1 account and an
account can be opened by 1 customer
A customer writes a review and a review
can be written by a customer
1 customer can write 1 or many reviews,
but 1 review can only come form 1 customer
A book can have many reviews but a review
is for one book
4
5
Modelling the classes and relationships: - EditorialReview
Book
title : String has
Review
1 *
4
7
Sequence Diagrams
Actors: Customer
Messages and Objects
1. The CUSTOMER clicks the Log-in button on the
Home Page.
2. The system displays the Log-in Page.
3. The CUSTOMER enters his/her user ID and
password. The CUSTOMER clicks the OK button.
5. The system validates the log-in information against the
ACCOUNT table in the database.
6. CUSTOMER is an authorised user; the system displays
the Personal Home Page to the CUSTOMER
:Customer :HomePage :LoginPage :Account
The Customer clicks
the Login button on clickLogin( )
the Home Page
56
Boundary Objects
is an object with which an actor
associated with a use case interacts. (More
of Interfacing)
if the actor is human, the boundary object
may be a window, screen, dialog box, or menu
if the actor is non-human, the boundary
object may be application program interfaces
(APIs)
boundary object
57
Entity Objects
is an object that contains long-lived
information, such as that associated with
databases.
will be mapped to a table (part of the
database) in the design phase
It can also contain temporary objects, i.e.
contents of lists in windows, or search
results. entity object
58
Control Objects
is an object that embodies application logic
correspond with system actions (not actions taken by
actors)
are often used to handle things such as coordination and
sequencing
are also useful for calculations involving multiple entity
objects
will be mapped to codes during implementation phase
used as a connecting tissue between boundary objects
and entity objects.
control object
59
Using the previous example (the log-in
use case of the Online Bookstore), we
can identify that
the HomePage and Log-in Page objects
are boundary objects,
whereas the Account object is an entity
object.
Therefore, taking this into account, we
can draw a new interaction diagram.
60
:Customer :HomePage :LoginPage :Account
62
On-line Bookstore is a web application that can be
accessed by the store’s registered customer,
whereby each customer can order books, review
one or more books sold in the book store, and sell
used books to other customers. Before performing
any one of these transactions, the customer must
first log-in into the system using their user id and
password kept in their account.
Problem: Draw the sequence diagram for the
above system
63
From previous discussions, we know that the
functional requirements for the Online
Bookstore can be seen from the use case
diagram (as shown in the next slide)
Each of the use cases in the use case diagram
must have its corresponding interaction diagram
We will use the scenarios in the ‘Main flow of
events’ for each use case to model the interaction
diagram
64
On-line Bookstore System
Register
<<extend>>
(CustID) Check out
Order books
<<include>>
Customer
<<include>>
Sell used Log-in
books
<<include>>
Review books
67
Register
69
Order
books
verify info
clickProceed( )
display( )
display( )
choose destination
clickOK()
display()
confirm and clickOK ()
Use case: Sell used books
Main flow of events: -
1. The CUSTOMER clicks the Sell Used Books button on the Home
Page.
2. The system displays the sell used books web page.
3. The CUSTOMER enters the required information on the used
books that he/she wants to sell.
4. The CUSTOMER clicks the SEND button on the webpage.
5. The system displays a confirmation page listing the information
that the CUSTOMER has entered.
6. The CUSTOMER checks that the information displayed are
accurate. If yes, the CUSTOMER clicks the OK button on the web
page.
7. The system updates the USED BOOKS table in the database.
Objects:
HomePage, UsedBooksPage and ConfirmationPage: boundary objects
Customer and Used Books: entity objects
73
:Customer :HomePage :UsedBooksPage :ConfPage :Customer :UsedBook
clickUsedBooks( )
display( )
verify info
clickOK( )
add( )
add( )
74
Use case: Review
Main flow of events: -
1. The CUSTOMER enters the keyword to search for a book and
then clicks the SEARCH button on the Personal Web Page.
2. The system displays the matching books on the web Page.
3. The CUSTOMER checks for the desired book and clicks on the
chosen book icon.
4. The system displays the book’s detail in the Book Detail web page.
5. The CUSTOMER clicks the REVIEW button on the web page.
6. The system displays the Review Book web page.
7. The CUSTOMER clicks on the desired star button and the click
the OK button on the web page.
8. The system calculates the overall rating of the book and updates
the Book table in the database.
9. The system displays the Book Detail web pages that have been
updated.
Objects?
Diagram?
75
State chart Diagrams
A state chart diagram is normally used to model
how the state of an object changes in its lifetime
State chart diagrams are good at describing how
the behavior of an object changes across several
use case executions
A state chart is a hierarchical model of a system
and introduces the concept of a composite state
(also called nested state).
The basic elements of the state chart diagram
are as follows:
Initial state- This is represented as a filled circle.
Final state- This is represented by a filled circle inside a larger circle
State- These are represented by rectangles with rounded corners.
Transition- A transition is shown as an arrow between two states.
State chart Diagrams
An example state chart for the order object of the Trade House Automation
software
Activity Diagrams
8
0
Example to illustrate the activity of performing selling an
item to a customer.
8
1
Component Diagram
A component diagram describes the organization of the physical components
in a system.
Basic Component Diagram Symbols and Notations
Component
A component is a physical building block of
the system. It is represented as a rectangle
with tabs.
Interface
An interface describes a group of operations
used or created by components.
Dependencies
Draw dependencies among components
using dashed arrows.
Component Diagram
Component Diagram For Library Management System
Node
A node is a physical resource that
executes code components
Association
Association refers to a physical connection
between nodes, such as
Ethernet.
Requirement Elicitation
Collecting and organizing users requirement- WHAT-
User needs
87
Basic objectives of the chapter
Define requirement and related concepts?
Requirement Elicitation concepts
Requirement elicitation activities
Managing requirements elicitation
88
88
Requirement and related concepts
What is requirement?
◦ Definition
◦ Types
Functional, non-functional, pseudo- requirement
Requirement engineering – includes
◦ Elicitation –system specification of the system
that the client understands,
◦ Analysis – system(structured analysis) models
that the developers can unambiguously
interpret
89
07/20/21 89
What is a Requirement ?
It is a statement describing either
◦ 1) an aspect of what the proposed system must do,
◦ or 2) a constraint on the system’s development.
◦ In either case it must contribute in some way towards
adequately solving the customer’s problem;
◦ the set of requirements as a whole represents a
negotiated agreement among the stakeholders.
A collection of requirements is a requirements
document.
90
07/20/21 90
An overview of requirements
elicitation
Is about a communication b/n developers , clients and user
in defining a new system define a system that addresses
the problem.
Such a definition is called a system specification and
serves as a contract between the client and the
developers
The system specification is structured and formalized
during analysis to produce an analysis model.
Both system specification and analysis model represent the
same information. They differ only in the language and
notation they use.
91
91
Cont..
System specification Vs Analysis model
◦ Represent same information
◦ Difference only on the language and notation
they use
system specification – natural languages
Analysis model is usually expressed in a formal or
semiformal notation
◦ Both- more of external aspect of the system
visible to users (users' view)
◦ They occur concurrently and iteratively
92
07/20/21 92
Requirements elicitation concepts
Types of Requirements
Functional requirements
◦ Describe what the system should do
◦ the interactions between the system and its environment
independent of its implementation.
Non-functional requirements
◦ describe user-visible aspects of the system that are not directly
related with the functional behavior of the system
◦ Quality requirements
Constraints on the design to meet specified levels of quality
Pseudo requirements
◦ requirements imposed by the client that restrict the
implementation of the system
◦ Platform requirements
Constraints on the environment and technology of the system
◦ Process requirements
Constraints on the project plan and development methods
93
07/20/21 93
Requirements elicitation concepts
Correctness, completeness, consistency, clarity, and
realism
Requirements are continuously validated with the client and the
user
Validation is a critical step in the development process, given that
both the client and the developer are dependent on the system
specification.
Requirement validation involves checking if the specification is
correct, complete, consistent, unambiguous, and realistic.
A specification is
◦ correct if it represents the client’s view of the system (i.e., everything in the
requirements model accurately represents an aspect of the system)
◦ complete if all possible scenarios through the system are described, including
exceptional behavior (i.e., all aspects of the system are represented in the
requirements model)
◦ consistent if it does not contradict itself
◦ unambiguous if exactly one system is defined (i.e., it is not possible to interpret
the specification two or more different ways).
◦ Realistic if the system can be implemented within constraints. The model
describes a reality that can exist.
94
07/20/21
Requirements elicitation concepts
Verifiability and traceability
The specification is verifiable if, once the system is built, a
repeatable test can be designed to demonstrate that the system
fulfills the requirement
The following requirements are examples of non verifiable requirements:
◦ The product shall have a good user interface (good is not defined).
◦ The product shall be error free (requires large amount of resources to
establish).
◦ The product shall respond to the user with 1 second for most cases
(“most cases” is not defined).
A system specification is traceable if each system
function can be traced to its corresponding set of
requirements
Traceability facilitates the development of tests and the
systematic validation of the design against the
requirements
95
07/20/21
Object-Oriented Software
Enginnering
98
Object Oriented Analysis Concepts
The main difference is that
The requirement gathering phase tries to understand
what the user needs and their usage of the system.
The analysis phase will be used to understand the
system itself in addition to the user usage.
Analysis Concepts
entity, boundary, and control objects
association multiplicity
qualified associations
generalization
Analysis Summary Basic Tasks
The requirements activity is highly iterative
and incremental
Developing and validating
(System) Use case model
Sequence Diagram
Conceptual Class Model (analysis level)
State chart/Activity Diagram
UI prototyping
Documenting Analysis
the requirements elicitation and analysis activities are
documented in the Requirements Analysis Document
(RAD).
We have already been written during requirements
elicitation. During analysis, we revise these sections as
ambiguities and new functionality is discovered.
Object Oriented Design
How to Construct?
Introduction
The object oriented analysis part does not
do well on how the system should be build.
This gap is filled by the design phase that
provides such details for the
implementation.
There are various artifacts that would be
used to model the design of the system that
evolve from the analysis phase.
103
Thus
Design is defined as
a meaningful engineering representation of something that is
to be built.
both “the process of defining the architecture, components,
interfaces, and other characteristics of a system or
component” and “the result of that process.”
As a process, software design is the software engineering
life cycle activity in which software requirements are
analyzed in order to produce a description of the
software’s internal structure that will serve as the basis
for its construction.
104
Why is it important?
105
The software design process
Software design is
an iterative process through which requirements are translated
into a “blueprint” for constructing the software.
is generally considered a two-step process:
Architectural design describes how software is decomposed
and organized into components (the software architecture)
Class type architecture, Component, Deployment, persistent
diagrams
Detailed design describes the specific behavior of these
components.
Refined class model ,Statechart, collaboration
106
Describing an architecture using UML
All UML diagrams can be useful to describe aspects
of the architectural model
Some UML diagrams are particularly suitable for
architecture modelling and for implementation issues:
Class Type architecture (not in UML)
Component diagrams
Deployment diagrams
Persistent diagram
Package/subsystem diagram
107
Class Type Architecture (not in UML)
A common architectural strategy, some might call it a
pattern, is to layer the architecture of a system into
several layers/strata.
Some strategies simply define N layers stacked on top
of each other where layer J interacts only with layers J-
1 and J+1.
The various layers are represented by the rectangles
and collaboration between layers by the arrows.
The primary name of a layer is indicated first, and
other common names in parenthesis.
108
Layered class type architecture
109
Class Modeling
The class model at the design level will add some
additional details than that of the analysis level
class model.
Here the focus will be the solution domain rather
than the problem domain.
In practice, the analysis level class model will
evolve into a design level class model.
There will be changes to be introduced to the
analysis class model based on implementation
technologies.
110
Cont…
The design level class model will concentrate on
how to implement attributes methods, inheritance,
association, aggregation, composition and the
likes.
Modeling Methods
Methods, also called operations or member functions,
are the object-oriented equivalent of functions and
procedures.
The design level will model more information about
methods than the analysis.
111
Cont…
The design level may include:
Visibility: the level of access that external
objects have to a method.
To reduce the effect of coupling within a system,
more restrictions on access of methods should be
set.
In other words, if a method does not have to be
public then make it protected and if it does not
have to be protected then make it private.
112
Cont…
Visibility Symbol Description Proper Usage
Public + A public method can be When the method must be
invoked by any other accessible by objects and classes
method in any other object outside of the class hierarchy in
or class. which the method is defined.
Protected # A protected method can be When the method provides behavior
invoked by any method in needed internally within the class
the class in which it is hierarchy, but not externally.
defined or any subclasses
of that class.
Private - A private method can only When the method provides behavior
be invoked by other specific to the class. Private
methods in the class in methods are often the result of
which it is defined, but not refactoring.
in the subclasses.
113
Cont…
Name: Descriptive name for the method. A good
name is the one that is capable of explaining the
purpose of the methods just by looking at its name.
In giving a name to methods the designer needs to know
what programming language will be used for the
development so that the naming convention of that language
will be used here.
Parameters: The names of parameters, and
optionally their types and default values (if any);
Return value type: The data type of the return value
(if available)
114
Cont…
Modeling Attributes
Attributes are the data aspects of objects.
The design level will model more
information about methods than the
analysis.
The design level may include:
Visibility: This is the level of access
external objects have to an attribute.(public ,
protected or privitae)
115
Cont…
Name: descriptive name to attributes.
A good attribute name is the one that is capable
of explaining the purpose of the attribute just by
looking at its name.
Type: The data type of an attribute should be
determined (could be a primitive type, such as
string or int, or a class such as Address.)
Initial value: The initial value for an attribute
should also be indicated (if available).
116
Cont…
Modeling Association
Objects in any system cannot exist and work alone. For
this reason they need to depend one another or collaborate
with each other.
The dependency and collaboration will help the development
team to define how they interact with each other.
The collaboration is important as an object needs to know
about another object to work with it.
For each association multiplicity should be modeled, one
on each end of the association line
117
Following is an example to compare
Analysis and design versions of a class
Analysis Level Design Level
118
Deployment Diagram
Shows the physical relationships among software and
hardware components in the delivered system.
is a good place to show how components and objects are
routed and move around a distributed system.
Each node on a deployment diagram represents some kind of
computational unit—in most cases, a piece of hardware.
The hardware may be a simple device or sensor, or it could
be a mainframe.
It shows where components will be located, on what servers,
machines or hardware.
119
Coding and Testing
120
Coding
Translating the design specification in to a working
system (a reality)
Two important issues
Coding style
To make readable and maintainable
Adding as much comments as possible, use combination
of uppercase and lower case in naming …
Programming language selection
A language that supports features required
For a web based applications vs window based
121
Software Testing
Testing is the process of exercising a
A software/program with the specific intent
of finding errors prior to delivery to the end
user.
Fault Detection: is a planned process identifying erroneous states
and finding the underlying faults before releasing the system.
Testing is Verification and Validation
“Are we building the right system?”
“Are we building the system right ?”
Software Testing
white-box black-box
methods methods
Methods
Strategies
White-Box Testing
125
Black-Box Testing
requirements
output
input events
Cont…
Testers provide the system with inputs and observe the
outputs
They can see none of:
The source code
The internal data
Any of the design documentation describing the system’s
internals
127
Testing performed by users and clients
Alpha testing
Performed by the user or client, but under the supervision of the
software development team.
Beta testing
Performed by the user or client in a normal work environment.
Recruited from the potential user population.
An open beta release is the release of low-quality software to the
general population.
Acceptance testing
Performed by users and customers.
However, the customers do it on their own initiative.
128
Finally
Software testing is four steps procedure
Initially, unit tests focus on each component
individually, ensuring that it functions properly as a unit.
makes heavy use of white-box testing techniques,
exercising specific paths in a module's control
structure to ensure complete coverage and maximum
error detection.
Cont…
Next, Integration test : components must be assembled
or integrated to form the complete software package.
Integration testing addresses the issues associated with the
dual problems of verification and program construction.
Black-box test case design techniques are the most prevalent
during integration, although a limited amount of white-box
testing may be used to ensure coverage of major control
paths.
Cont…
After the software has been integrated (constructed), a
set of high-order tests are conducted. Validation
criteria (established during requirements analysis)
must be tested.
Validation testing provides final assurance that software
meets all functional, behavioral, and performance
requirements.
Black-box testing techniques are used exclusively during
validation.
Cont….
The last high-order testing step falls outside the
boundary of software engineering and into the broader
context of computer system engineering. Software,
once validated, must be combined with other system
elements (e.g., hardware, people, databases).
System testing verifies that all elements mesh properly
and that overall system function/performance is
achieved.
Others
Installation
Putting the system in to work
Direct/phased/parallel/ one site
Training
Enabling end users and technical personals to work and
mange the system/software
For whom and how much?
Maintenance
Providing continuous support as long as the
software/system is alive.
Adaptive/perfective/corrective
133
Summary
Introduction
Understanding motivations and basic concepts
Terminologies , concepts, processes, approaches
Requirement elicitation
Collecting and organizing users requirement- WHAT- User
needs
From function, class, and interface points of view
134
Cont…
Requirement Analysis
Analyzing and modeling requirements-WHAT System
In terms of Function, Logic and Objects (classes)
135
End of the Course
136