Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 76

Software Engineering

Software Specification Models


The Waterfall Model
Requirements
Definition

System and
Software design
Implementation
and Unit Testing

Integration and
System Testing

Operation and
Maintenance
ANALYSIS PHASE
• The development process starts with the
analysis phase. This phase results in a
specification document that shows what the
software will do without specifying how it
will be done.
• The analysis phase can use two separate
approaches, depending on whether the
implementation phase is done using a
procedural programming language or an
object-oriented language.
System modelling

System modelling helps the analyst


to understand the functionality of
the system and models are used to
communicate with customers
Stages of Design
1. Problem understanding
• Look at the problem from different angles to discover the
design requirements.
2. Identify one or more solutions
• Evaluate possible solutions and choose the most
appropriate depending on the designer's experience and
available resources.
3. Describe solution abstractions
• Use graphical, formal or other descriptive notations to
describe the components of the design.
4. Repeat process for each identified abstraction
until the design is expressed in primitive terms.
Requirements Specification: Approaches

• Natural language
• Structured natural language
• Design description language
• Requirements specification language
• Graphical notation
• Formal specification
Data Flow Diagrams

DFDs model the system from a functional
perspective

Tracking and documenting how the data
associated with a process is helpful to
develop an overall understanding of the
system

Data flow diagrams may also be used in
showing the data exchange between a
system and other systems in its environment
Example DFD: Enrolling in a University

In Gane and Sarson


4 Main Elements

external entity - people or organisations that
send data into the system or receive data from
the system

process - models what happens to the data i.e.
transforms incoming data into outgoing data

data store - represents permanent data that is
used by the system

data flow - models the actual flow of the data
between the other elements
SYMBOLS USED IN A DFD

± PROCESS Actions performed on data


so that they are
transformed, stored or
distributed.

± DATA FLOW
E.g. Result of a query to a
database, contents of a printed
report : data that moves
together to common
destinations
Data Flow Diagrams
Process

3 Cashier

Sell
Stock
SYMBOLS USED IN A DFD
± DATA STORE
A physical location to hold
data e.g. a file folder or
notebook etc.

± SOURCE/SINK
Origin and/or destination
of the data. Often
referred to as external
entities as they are
outside the system.
Data Flow Diagrams
Data Flows

Customer Details
Data Flow (usual)

Bi-directional Flow (rare)

Flow Between External Entities Goods


(for convenience)

Resource Flow (for convenience) Cosmetics


DFD Shapes from Visio
Visio 5.x Visio 2000
F r o m S o ftw a r e D ia g r a m / From Flow Chart /
F r o m F lo w C h a r t / G a n e -S a rs o n D F D Data Flow Diagram
D a ta F lo w D ia g r a m
ID #

Process
P ro c e s s P ro c e s s

Data Store
D a ta S to re 1 D a ta S to re

ID
# External
E x te r n a l E n tity E x te rn a l Entity
E n tity
Data Flow Diagrams
Decomposing Data Flow Diagrams

Manager

1 Order Stock
Stock List Purchase Order

1.1 1.2
Produce Record
Stock Purchase
List Order
* *

Stock List Purchase Order

Stock Purchase Order


M2 M1
File Cabinet
Example Data Flow Diagram: Book Shipping and Receiving System

Alternate
shape

Data Flow Diagrams


Example: University Admissions

Rejection
Application Completed
form Receive application
application Evaluate
Applicant
Offer
Example: University Admissions
Assemble Application Stage

Acknowledgment Acknowledgment

Application Completed AND


Evaluation
form application Initiate request
Receive
evaluation
Applicant AND

Supporting
information
Pending Applicant
database database
Example: University Admissions
Process Completed Application Stage

Rejection

Evaluation
request Acceptance Offer
Evaluation Financial
aid

Special
request

Applicant
database
Reading a DFD
DFD Example
Levelled DFDs

Even a small system could have many
processes and data flows and DFD could
be large and messy
• use levelled DFDs - view system at different
levels of detail
• one overview and many progressively greater
detailed views

4
Relationship Among DFD levels
Top-Down Modeling – Process Decomposition
Draw data flow diagrams for what is happening inside each Level 0 function,
etc….

System
Context Diagram
2
3
3.1 1
3.3
Level 0
3.2
Level 1

Level 2
Level 0 - Context Diagram

models system as one process box which
represents scope of the system

identifies external entities and related inputs
and outputs

Additional notation - system box

External Data flow out System box


entity
Data flow in
Context Diagram
Staff Assignment Payment
Campaign Accountant
Manager Campaign
Staff
Client
Staff Grade
Agate
Campaign Advert Completion
Staff
Budget Management Contact
Client Contact
System
Advert
Campaign
Staff Concept Note
Concept Note Staff
Level 1 - overview diagram

gives overview of full system

identifies major processes and data flows
between them

identifies data stores that are used by the
major processes

boundary of level 1 is the context
diagram
Top Level Diagram (Level 1)
Client
Clients Staff
1. 4.
Campaign Accountant
Record Client Staff Maintain
Manager Staff Grade
Clients Staff
Staff Members Payment
Campaign Staff
Staff Advert Completion
Budget 2. Campaigns
Plan and 5. Staff
Manage Campaign Manage Contact
Staff Assignment Contact Adverts Client Contact
Campaigns Cost + Completion Date

Adverts
Advert
Campaign 3.
Prepare Advert Concept
Staff 6. Note
Adverts Browse Staff
Concept Note
Concept Note Concept
Notes
Concept
Notes
Note
Level 2 Diagrams

level 1 process is expanded into more detail

each process in level 1 is decomposed to show its
constituent processes

Level 2 diagrams may not be needed for all level 1
processes

Correctly numbering each process helps the user
understand where the process fits into the overall
system
Level 2 Diagram

Staff Members

Client Contact
Staff
5.1
Set Client
Contact
Contact

Adverts
Advert Completion

5.2 Completion Date


Set Advert
Completed
Numbering

On level 1 processes are numbered 1,2,3…

On level 2 processes are numbered x.1, x.2,
x.3… where x is the number of the parent
level 1 process

Number is used to uniquely identify
process not to represent any order of
processing

Data store numbers usually D1, D2, D3...
Labelling

Process label - short description of what
the process does, e.g. Price order

Data flow label - noun representing the
data flowing through it e.g. Customer
payment

Data store label - describes the type of
data stored

Make labels as meaningful as possible
Level 0 Context diagram

CUSTOMER KITCHEN

Food
ordering
system

RESTAURANT
MANAGER
Level 0 Context diagram

CUSTOMER KITCHEN

0
Customer Order
Food
ordering
Food Order
system
Receipt

Management
Reports

RESTAURANT
MANAGER
1.0

Receive and
transform
Customer Food
Order

3.0 2.0

Update Update
Goods Inventory
Sold file file

4.0

Produce
Management
Reports
CUSTOMER KITCHEN

1.0

Customer Order Receive and


transform
Customer Food Food Order
Order
Receipt

3.0 2.0

Update Update
Goods Inventory
Sold file file

D2 Inventory File
D1 Goods Sold
4.0
File

Produce
Management
Reports

RESTAURANT
Management MANAGER
Reports
CUSTOMER KITCHEN

1.0

Customer Order Receive and


transform
Customer Food Food Order
Order
Receipt

Goods Inventory
3.0 Sold Data 2.0

Update Update Inventory Data


Goods Inventory
Goods Sold file file
Sold Data

D2 Inventory File
D1 Goods Sold
4.0
File

Produce
Daily Goods Sold Management Daily Inventory Depletion Amounts
Amount Reports

RESTAURANT
Management MANAGER
Reports
DFD Example : Payroll
Example

Alexsoft shop buys software from various
suppliers and sells it to the public

The shop stocks popular software packages
and orders as required

The shop sells monthly about 300 packages

The shop need to be computerized
DFD
Package data

Package details

order
Customer Process
order
invoice

Credit status
Customer data
DFD (2)
Package data

Package details

order
Customer Verify order
Assemble is valid
order
invoice details

Credit status
Customer data
DFD (3)

Details of package to Batched order


Verify order be ordered Place order at
is valid Pending orders supplier

Address or telephone

Software
Supplier
DFD (4)
Package data

Package details

order
Customer Verify order
Assemble is valid
order
invoice details
payment Credit status
Customer data
Payment to Account
invoice
receivable
Creating Data Flow Diagrams
Lemonade Stand Example
Creating Data Flow Diagrams
Example Steps:
The operations of a simple
lemonade stand will be used
1. Construct Context Level
to demonstrate the creation DFD
of dataflow diagrams.
(identifies sources and sink)
2. Construct Level 0 DFD
(identifies manageable sub
processes )
3. Construct Level 1- n DFD
(identifies actual data flows
and data stores )
Creating Data Flow Diagrams
Example
1. Create a list of activities
Think through the activities
that take place at a
lemonade stand.

Customer Order
Serve Product
Collect Payment
Produce Product
Store Product
Creating Data Flow Diagrams
Example 1. Create a list of activities
Also think of the additional
activities needed to support Customer Order
the basic activities.
Serve Product
Collect Payment
Produce Product
Store Product
Order Raw
Materials
Pay for Raw
Materials
Pay for Labor
Creating Data Flow Diagrams
Example 2. Construct Context Level DFD
(identifies sources and sink)
Create a context level
diagram identifying the Context Level DFD
sources and sinks (users).
Sales Forecast
Order 0.0
CUSTOMER Lemonade Production Schedule EMPLOYEE
Customer Order Product Served System Pay
Serve Product Payment Time Worked
Collect Payment Received Goods
Payment
Purchase Order
Produce Product
Store Product VENDOR

Order Raw Materials


Pay for Raw Materials

Pay for Labor


Creating Data Flow Diagrams
Example 3. Construct Level 0 DFD
Create a level 0 diagram (identifies manageable sub processes )
identifying the logical Level 0 DFD
subsystems that may exist.
1.0
Sale
Customer Order Sales Forecast
Customer Order
Product Ordered
Serve Product
Payment
Collect Payment 2.0 Production
CUSTOMER EMPLOYEE
Production Schedule
Product Served
Produce Product
Received Goods Inventory
Store Product
3.0
VENDOR Procure- Order
Purchase Order
Order Raw Materials ment Decisions
Pay for Raw Materials Payment
Pay Time Worked

Pay for Labor 4.0


Payroll
Creating Data Flow Diagrams
Example 4. Construct Level 1- n DFD
Create a level 1 (identifies actual data flows and data stores )
decomposing the processes Level 1 DFD
in level 0 and identifying
CUSTOMER
data stores.
Customer Order
Request for Forecast
Customer Order ORDER
1.1
Serve Product Record
Collect Payment Order
1.3
Produce
Severed Order Sales
Produce Product Payment Forecast
Sales Forecast
Store Product 1.2
Receive PAYMENT
Payment
Order Raw Materials
Pay for Raw Materials

Pay for Labor


Creating Data Flow Diagrams
Example 4. Construct Level 1 (continued)
Create a level 1
decomposing the processes Level 1 DFD
in level 0 and identifying
Product Order
data stores.
ORDER
Customer Order 2.1
Serve Quantity Severed
Serve Product Product
Collect Payment RAW
Production
MATERIALS
Schedule
Produce Product 2.2
Store Product Produce Quantity Used
Product

INVENTORTY
Order Raw Materials Production Data
Pay for Raw Materials
2.3 Quantity Produced &
Store Location Stored
Pay for Labor Product
Creating Data Flow Diagrams
Example 4. Construct Level 1 (continued)
Create a level 1
decomposing the processes Level 1 DFD
in level 0 and identifying Order Decision
PURCHASE
data stores. 3.1 ORDER
Produce
Purchase
Customer Order Order Quantity On-Hand
Serve Product Quantity
RAW
MATERIALS
Collect Payment Received Received
Goods
3.2
Produce Product Receive
Items
Store Product RECEIVED
ITEMS
Payment Approval
Order Raw Materials
VENDOR
Pay for Raw Materials 3.3
Pay
Vendor
Pay for Labor
Payment
Creating Data Flow Diagrams
Example 4. Construct Level 1 (continued)
Create a level 1
decomposing the processes Level 1 DFD
in level 0 and identifying Time Worked

data stores. 4.1 TIME CARDS


Record
Time
Customer Order Worked Employee ID
Serve Product EMPLOYEE
Collect Payment
Payroll Request
4.2
Unpaid time cards
Produce Product Calculate
Payroll
Store Product PAYROLL

Payment Approval
Order Raw Materials
4.3
Pay for Raw Materials Pay
Employe
e PAYMENTS
Pay for Labor
Payment
Process Decomposition
1.1 1.2
1.0
Record Receive
Sale
Order Payment

2.1 2.2 2.3


2.0
Serve Produce Store
Production
Product Product Product

0.0
Lemonade
System 3.1
3.0 3.2 3.3
Produce
Procure- Receive Pay
Purchase
ment Items Vendor
Order

4.1 4.3
4.2
4.0 Record Pay
Calculate
Payroll Time Employe
Payroll
Worked e

Context Level Level 0 Level 1


DFD Example: Bus Garage Repairs

Buses come to a garage for repairs.

A mechanic and helper perform the repair, record
the reason for the repair and record the total cost
of all parts used on a Shop Repair Order.

Information on labor, parts and repair outcome is
used for billing by the Accounting Department,
parts monitoring by the inventory management
computer system and a performance review by
the supervisor.
DFD Example: Bus Garage Repairs (cont’d)

External Entities: Bus, Mechanic, Helper,
Supervisor, Inventory Management System,
Accounting Department, etc.

Key process (“the system”): performing repairs and
storing information related to repairs

Processes:
• Record Bus ID and reason for repair
• Determine parts needed
• Perform repair
• Calculate parts extended and total cost
• Record labor hours, cost
DFD Example: Bus Garage Repairs
(cont’d)

Data stores:
• Personnel file
• Repairs file
• Bus master list
• Parts list

Data flows:
• Repair order
• Bus record
• Parts record
• Employee timecard
• Invoices
Bus Garage Context Diagram

Bus

Mechanical Fixed
problem mechanical
to be repaired problems

Bus Repair Supervisor


Helper Labor
Repair summary

Process
System List of parts
used
Inventory
Labor
Management
Labor, parts
cost details System

Mechanic

Accounting
Burger’s Order Processing System

Draw the Burger’s context diagram
• System
» Order processing system
• External entities
» Kitchen
» Restaurant
» Customer
• Processes
» Customer order
» Receipt
» Food order
» Management report
Joe’s builders’ suppliers has a shop and a yard. He has a stock
list on the wall of his shop, complete with prices. When a
builder wants to buy supplies, he goes into the shop and
picks the stock items from the list. He writes his order on a
duplicate docket and pays Joe, who stamps the docket as
paid. The builder takes the duplicate docket and he goes to
the yard and hands it to the yard foreman. The yard
foreman gets the ordered items from the yard and gives
them to the builder. The builder signs the duplicate docket
and leaves one copy with the foreman and takes one copy
as a receipt. Every week, Joe looks around the yard to see
if any of his stock is running low. He rings up the relevant
suppliers and reorders stock. He records the order in his
order book, which is kept in the yard. The yard foreman
takes delivery of the new stock and checks it against what
has been ordered. He pays for it on delivery and staples
the receipt into the order book. At the end of every month,
Joe goes through all the dockets and the order book and
produces a financial report for the shareholders.
Context diagram
Shareholders

financial
report
Docket &
Payment
Joe's
Supply needs Yard
Joe Customer
Signed docket

Supply order
& payment Supply invoice

Supplier
Level-1 DFD processes
Joe’s builders’ suppliers has a shop and a yard. His system is
entirely manual. He has a stock list on the wall of his shop,
complete with prices. When a builder wants to buy supplies, he
goes into the shop and picks the stock items from the list. He
writes his order on a duplicate docket and pays Joe, who stamps
the docket as paid. The builder takes the duplicate docket and
he goes to the yard and hands it to the yard foreman. The yard
foreman gets the ordered items from the yard and gives them to
the builder. The builder signs the duplicate docket and leaves
one copy with the foreman and takes one copy as a receipt.
Every week, Joe looks around the yard to see if any of his stock
is running low. He rings up the relevant suppliers and reorders
stock. He records the order in his order book, which is kept in
the yard. The yard foreman takes delivery of the new stock and
checks it against what has been ordered. He pays for it on
delivery and staples the receipt into the order book. At the end
of every month, Joe goes through all the dockets and the order
book and produces a financial report for the shareholders.
Level 1 current physical
20

Buy Money Supplier


supplies Payment 22 receipt
Payment Payment
Docket & Restock
Payment Docket supplies
Supplier
supplies
Customer M1 Docket Supply order
completed
docket copy
Order
completed M3
required stock book
docket copy
stock
Signed docket
12
Supply order
builder
required stock
signature get
Joe
11 items completed Supplier
receipt 21 Supply needs
Take docket copy
to
Reorder
yard
* supplies
Signed docket
Signed docket 5 Joe's Office
Produce financial
financial report Shareholders
report
Foreman *
Buy Supplies
20 Buy supplies M1 Docket

Customer
20.1
Docket
Docket
Writes
Order
* Docket
Payment 20.3
Stamp
Docket(signatu-
re)
*
20.2
Money
Payment
Pays
Joe
*
Get Items
12 get items
12.2

Signed docket Get builder


Foreman
12.1 signature builder
Signed docket
* signature
Give items
Customer
to customer
* completed
required stock docket copy completed
stock docket copy

12.3
Give
copy
as receipt
*
Reorder supplies
21 Reorder supplies

21.1
Joe Supply needs Reorder
from
yard
*

Supply needs

21.2
Order
Supply order M3
Record book
order
*
Restock

22 Restock

Order
M3
book
22.1 stock
Supply order
supplies
Take
delivery
*

supplies
Supply order

Money
22.2
Payment Supplier Supplier
receipt
Pay
supplier
Payment
*

The waterfall model is appropriate when
requirement changes are limited.
• True b. False

Evolutionary software process models
• Are iterative in nature
• Can easily accommodate product requirements changes
• Do not generally produce throwaway systems
• All of the above

The first step in project planning is to
• determine the budget.
• select a team organizational model.
• determine the project constraints.
• establish the objectives and scope.

Give the time network chart for a giving example
based on the following project data:

i) The project involved 7 tasks:T1, T2, T3, T4, T5,
T6, T7;

ii) The tasks have the following durations: T1 (3
weeks), T2 (2 weeks), T3 (4 weeks), T4 (1 week), T5
(3 weeks), T6 (2 weeks), T7 (4 weeks);

iii) Tasks T4 and T5 are dependent on Milestone M1
produced by Task T1;

iv) Task T5 is also dependent on Milestone M2
produced by Task T2;

v) Task T6 is dependent on Milestones M3 and M5
produced Task T3 and Task T5 respectively

Suggest an appropriate software process model that might
be used as a basis for managing the development of the
following systems:

a) an e-auction system which will run over the web,

b) a modification to a computer game,

c) a system to control radiation therapy administered to
patients in a hospital,

d) a new virtual learning environment for a college or
school, and

e) an interactive web-based system that allows customers
to review films available and book tickets for a cinema.

In each case, justify your choice by giving reasons that take
into account the type of system that is to be developed.
Case Study: Train Routing
switch


Consider a system designed to
route trains automatically setting


Upon arrival at some light
• train is assigned a new route
location directive
• which takes it to the next light Train
Router

The system selects proper position detector light

for each switch along the route.


route

station

[ §6 : 73 ]
Case Study: Train Routing

Data stores
• network layout

Stimuli
• • arrival at a light
traffic
» unlock side protection lights
» identify blocked trains
» reprocess their routes
» get new route
» lock side protection lights on
red
» turn light green (if successful)
Running Case Study: Elevator

Consider the
development of an arrival
lights
elevator control system
for a 10-story
fire
residential building. alarm request
buttons
call
buttons

[ §4 : 75 ]
Centralized Controller

All external interfaces
have been identified
requests

The specification does
not rule out a distributed
implementation … Elevator
controller

… but provides a
concrete high-level
architecture to allow motor door
further specification and
refinement

[ §4 : 76 ]

You might also like