Software specification models
This presentation is the property of its rightful owner.
Sponsored Links
1 / 78

Software Specification Models PowerPoint PPT Presentation


  • 71 Views
  • Uploaded on
  • Presentation posted in: General

Software Specification Models. Software Engineering. The Waterfall Model. Requirements Definition. System and Software design. Implementation and Unit Testing. Integration and System Testing. Operation and Maintenance. Focus on models. ANALYSIS PHASE.

Download Presentation

Software Specification Models

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Software specification models

Software Specification Models

Software Engineering


The waterfall model

The Waterfall Model

Requirements

Definition

System and

Software design

Implementation

and Unit Testing

Integration and

System Testing

Operation and

Maintenance


Focus on models

Focus on models


Software specification models

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

System modelling helps the analyst to understand the functionality of the system and models are used to communicate with customers


Stages of design

Stages of Design

  • Problem understanding

    • 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 depending on the designer's experience and available resources.

  • 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.


Requirements specification approaches

Requirements Specification: Approaches

• Natural language

• Structured natural language

• Design description language

• Requirements specification language

• Graphical notation

• Formal specification


Software specification models

Procedure-oriented analysis

Procedure-oriented analysis—also called structured analysis or classical analysis—is the analysis process used if the system implementation phase will use a procedural language. The specification in this case may use several modeling tools, but we discuss only a few of them here.


Software specification models

Data flow diagrams

Data flow diagrams show the movement of data in the system.


Software specification models

Entity-relationship diagrams

Another modeling tool used during the analysis phase is the entity-relationship diagram. This diagram is also used in database design.


Entity relation diagram

Entity-Relation Diagram

An entity

A relation between entities

An entity or relation attribute

An inheritance relation


Example cs 311 project

CS311 Student

Example: CS 311 Project

Major

Client

0:n

1

Student

Project

Person

0:n

0:n

1

Tech contact

5 to 7

Member of


Example cs 305 project

CS305 Student

Example: CS 305 Project

Major

Client

0:n

1

Student

Project

Person

0:n

0:n

1

Tech contact

5 to 7

Member of


Software specification models

State diagrams

State diagrams provide another useful tool that is normally used when the state of the entities in the system will change in response to events. As an example of a state diagram, we show the operation of a one-passenger elevator. When a floor button is pushed, the elevator moves in the requested direction. It does not respond to any other request until it reaches its destination.


Software specification models

An example of a state diagram


Software specification models

Object-oriented analysis

Object-oriented analysis is the analysis process used if the implementation uses an object-oriented language. The specification document in this case may use several tools.


Software specification models

Use case diagrams

A use-case diagram gives the user’s view of a system: it shows how users communicate with the system. A use-case diagram uses four components: system, use cases, actors and relationships. A system, shown by a rectangle, performs a function.


Software specification models

Class diagrams

The next step in analysis is to create a class diagram for the system. For example, we can create a class diagram for our old-style elevator. To do so, we need to think about the entities involved in the system.


Software specification models

State chart

After the class diagram is finalized, a state chart can be prepared for each class in the class diagram. A state chart in object-oriented analysis plays the same role as the state diagram in procedure-oriented analysis.


Microwave oven state description

Microwave oven state description


Microwave oven model

Microwave oven model


Microwave oven operation

Microwave oven operation


Data flow diagrams

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


4 main elements

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


Software specification models

  • PROCESS

  • DATA FLOW

SYMBOLS USED IN A DFD

Actions performed on data so that they are transformed, stored or distributed.

E.g. Result of a query to a database, contents of a printed report : data that moves together to common destinations


Software specification models

  • DATA STORE

  • SOURCE/SINK

SYMBOLS USED IN A DFD

A physical location to hold data e.g. a file folder or notebook etc.

Origin and/or destination of the data. Often referred to as external entities as they are outside the system.


Example university admissions

Example: University Admissions

Rejection

Application

form

Completed

application

Receive

application

Evaluate

Applicant

Offer


Example university admissions assemble application stage

Example: University AdmissionsAssemble Application Stage

Acknowledgment

Acknowledgment

Application

form

Completed

application

AND

Evaluation

request

Initiate

evaluation

Receive

Applicant

AND

Supporting

information

Applicant

database

Pending

database


Example university admissions process completed application stage

Example: University AdmissionsProcess Completed Application Stage

Rejection

Evaluation

request

Acceptance

Offer

Financial

aid

Evaluation

Special

request

Applicant

database


Dfd shapes from visio

DFD Shapes from Visio

Visio 2000

Visio 5.x


Reading a dfd

Reading a DFD


Levelled dfds

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

Relationship Among DFD levels


Level 0 context diagram

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


Level 1 overview diagram

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


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 Diagrams


Numbering

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

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


Context diagram

Context Diagram

Accountant

CampaignManager

Staff Assignment

Payment

Campaign

Staff

Client

Staff Grade

Agate

Campaign

Management

System

Staff

Contact

Advert Completion

Budget

Client Contact

CampaignStaff

Advert

Staff

Concept Note

Concept Note


Top level diagram level 0

Staff Members

Campaigns

Adverts

Clients

Notes

Top Level Diagram (Level 0)

Client

1.

Record

Clients

4.

Maintain

Staff

Accountant

Staff

CampaignManager

Staff

Client

Staff Grade

Payment

Staff

Campaign

Staff

Advert Completion

2.

Plan and

Manage

Campaigns

5.

Manage

Adverts

Staff

Contact

Budget

Campaign

Contact

+ Completion Date

Staff Assignment

Client Contact

Cost

3.

Prepare

Adverts

Advert

CampaignStaff

Staff

6.

Browse

Concept

Notes

Concept

Note

Advert

Concept Note

Concept Note

Concept

Note

Concept

Note


Level 1 diagram

Staff Members

Adverts

Level 1 Diagram

Client Contact

Staff

5.1

Set Client

Contact

Contact

Advert Completion

5.2

Set AdvertCompleted

Completion Date


Example

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


System requirements

System requirements

  • Business functions, account payable, accounts receivable and inventory

  • The system is batch or online

  • One computer with appropriate configuration


Software specification models

DFD

Package data

Package details

Customer

order

Process order

invoice

Credit status

Customer data


Dfd 2

DFD (2)

Package data

Package details

Customer

order

Verify order is valid

Assemble order

invoice

details

Credit status

Customer data


Dfd 3

DFD (3)

Details of package to be ordered

Batched order

Verify order is valid

Place order at supplier

Pending orders

Address or telephone

Software Supplier


Dfd 4

DFD (4)

Package data

Package details

Customer

order

Verify order is valid

Assemble order

invoice

details

payment

Credit status

Customer data

Payment to invoice

Account receivable


Software specification models

0

Food ordering system

Level 0 Context diagram

CUSTOMER

KITCHEN

RESTAURANT MANAGER


Software specification models

Level 0 Context diagram

CUSTOMER

KITCHEN

0

Customer Order

Food ordering system

Food Order

Receipt

Management Reports

RESTAURANT MANAGER


Software specification models

1.0

Receive and transform Customer Food Order

3.0

2.0

Update Inventory file

Update Goods Sold file

4.0

Produce Management Reports


Software specification models

1.0

Receive and transform Customer Food Order

CUSTOMER

KITCHEN

3.0

2.0

Update Inventory file

Update Goods Sold file

D2

Inventory File

Goods Sold File

D1

4.0

Produce Management Reports

Customer Order

Food Order

Receipt

RESTAURANT MANAGER

Management Reports


Software specification models

1.0

Receive and transform Customer Food Order

CUSTOMER

KITCHEN

Inventory

Data

Goods

Sold

3.0

2.0

Update Inventory file

Inventory Data

Update Goods Sold file

Goods Sold Data

D2

Inventory File

Goods Sold File

D1

4.0

Produce Management Reports

Daily Inventory Depletion Amounts

Daily Goods Sold Amount

Customer Order

Food Order

Receipt

RESTAURANT MANAGER

Management Reports


Dfd example payroll

DFD Example : Payroll


Software specification models

Creating Data Flow Diagrams

Lemonade Stand Example


Software specification models

Creating Data Flow Diagrams

Example

Steps:

The operations of a simple lemonade stand will be used to demonstrate the creation of dataflow diagrams.

  • Create a list of activities

    • Old way: no Use-Case Diagram

    • New way: use Use-Case Diagram

  • Construct Context Level DFD(identifies sources and sink)

  • Construct Level 0 DFD (identifies manageable sub processes )

  • Construct Level 1- n DFD (identifies actual data flows and data stores )


Software specification models

Creating Data Flow Diagrams

Example

  • 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


Software specification models

Creating Data Flow Diagrams

Example

  • Create a list of activities

Also think of the additional activities needed to support the basic activities.

Customer Order

Serve Product

Collect Payment

Produce Product

Store Product

Order Raw Materials

Pay for Raw Materials

Pay for Labor


Software specification models

Creating Data Flow Diagrams

Example

  • Create a list of activities

Group these activities in some logical fashion, possibly functional areas.

Customer Order

Serve Product

Collect Payment

Produce Product

Store Product

Order Raw Materials

Pay for Raw Materials

Pay for Labor


Software specification models

Creating Data Flow Diagrams

Example

  • Construct Context Level DFD(identifies sources and sink)

Create a context level diagram identifying the sources and sinks (users).

Context Level DFD

Sales Forecast

CUSTOMER

0.0

Lemonade System

EMPLOYEE

Order

Production Schedule

Customer Order

Serve Product

Collect Payment

Produce Product

Store Product

Order Raw Materials

Pay for Raw Materials

Pay for Labor

Product Served

Pay

Payment

Time Worked

Received Goods

Payment

Purchase Order

VENDOR


Software specification models

Creating Data Flow Diagrams

Example

  • Construct Level 0 DFD (identifies manageable sub processes )

Create a level 0 diagram identifying the logical subsystems that may exist.

Level 0 DFD

1.0

Sale

Sales Forecast

Customer Order

Customer Order

Serve Product

Collect Payment

Produce Product

Store Product

Order Raw Materials

Pay for Raw Materials

Pay for Labor

Product Ordered

Payment

CUSTOMER

2.0

Production

EMPLOYEE

Production Schedule

Product Served

Inventory

Received Goods

VENDOR

3.0

Procure-ment

Purchase Order

Order Decisions

Payment

Pay

Time Worked

4.0

Payroll


Software specification models

Creating Data Flow Diagrams

Example

  • Construct Level 1- n DFD (identifies actual data flows and data stores )

Create a level 1 decomposing the processes in level 0 and identifying data stores.

Level 1 DFD

CUSTOMER

Customer Order

Request for Forecast

Customer Order

Serve Product

Collect Payment

Produce Product

Store Product

Order Raw Materials

Pay for Raw Materials

Pay for Labor

ORDER

1.1

Record Order

1.3

Produce Sales Forecast

Severed Order

Payment

Sales Forecast

1.2

Receive Payment

PAYMENT


Software specification models

Creating Data Flow Diagrams

Example

  • Construct Level 1 (continued)

Create a level 1 decomposing the processes in level 0 and identifying data stores.

Level 1 DFD

Product Order

ORDER

2.1

Serve Product

Customer Order

Serve Product

Collect Payment

Produce Product

Store Product

Order Raw Materials

Pay for Raw Materials

Pay for Labor

Quantity Severed

RAW MATERIALS

Production Schedule

2.2

Produce Product

Quantity Used

INVENTORTY

Production Data

2.3

Store

Product

Quantity Produced & Location Stored


Software specification models

Creating Data Flow Diagrams

Example

  • Construct Level 1 (continued)

Create a level 1 decomposing the processes in level 0 and identifying data stores.

Level 1 DFD

Order Decision

PURCHASE ORDER

3.1

Produce Purchase Order

Customer Order

Serve Product

Collect Payment

Produce Product

Store Product

Order Raw Materials

Pay for Raw Materials

Pay for Labor

Quantity On-Hand

RAW MATERIALS

Quantity Received

Received Goods

3.2

Receive Items

RECEIVED ITEMS

Payment Approval

3.3

Pay Vendor

VENDOR

Payment


Software specification models

Creating Data Flow Diagrams

Example

  • Construct Level 1 (continued)

Create a level 1 decomposing the processes in level 0 and identifying data stores.

Level 1 DFD

Time Worked

TIME CARDS

4.1

Record Time Worked

Customer Order

Serve Product

Collect Payment

Produce Product

Store Product

Order Raw Materials

Pay for Raw Materials

Pay for Labor

Employee ID

EMPLOYEE

Payroll Request

4.2

Calculate Payroll

Unpaid time cards

PAYROLL

Payment Approval

4.3

Pay Employee

PAYMENTS

Payment


Software specification models

Process Decomposition

1.0

Sale

1.1

Record Order

1.2

Receive Payment

2.0

Production

2.1

Serve Product

2.2

Produce Product

2.3

Store

Product

0.0

Lemonade System

3.0

Procure-ment

3.1

Produce Purchase Order

3.2

Receive Items

3.3

Pay Vendor

4.0

Payroll

4.1

Record Time Worked

4.2

Calculate Payroll

4.3

Pay Employee

Context Level

Level 0

Level 1


Dfd example bus garage repairs

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

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 d1

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


Software specification models

Inventory Management System

Helper

Bus

Accounting

Supervisor

Bus Repair Process

System

Mechanic

Bus Garage Context Diagram

Fixed mechanical

problems

Mechanical problem

to be repaired

Repair summary

Labor

List of parts used

Labor

Labor, parts cost details


Csub burger s order processing system

CSUB Burger’s Order Processing System

  • Draw the CSUB Burger’s context diagram

    • System

      • Order processing system

    • External entities

      • Kitchen

      • Restaurant

      • Customer

    • Processes

      • Customer order

      • Receipt

      • Food order

      • Management report


Software specification models

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 diagram1

Context diagram


Level 1 dfd processes

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

Level 1 current physical


Buy supplies

Buy Supplies


Get items

Get Items


Reorder supplies

Reorder supplies


Restock

Restock


  • Login