Primitive views of the Software Design

The Software Life-Cycle Models

Waterfall Model


Waterfall model

(1) The feedback loops permits modifications to be made to design documents, the software project management plan, and even the specification document, if necessary.

(2) No phase is complete until the documentation for that phase has been completed and the products of that phase has been approved by the SQA group.

(3) Once the client has accepted the product, any changes constitute maintenance.

(4) Inherent in every phase is testing.

Software configuration is the entire set of documents, including specification document, design document, code, user manual, operations manual, etc.


Rapid Prototyping Model


Rapid prototyping model

A rapid prototype is a working model that is functionally equivalent to a subset of the product.

(1) Because the working prototype has been validated through interaction with the client, the resulting specification will be correct. Therefore a major strength of this model is that the development process is essential linear with little or no feedback loops.

(2) In specification, planning and design, verification is needed. In implementation and integration, testing is needed.

(3) An essential aspect of a rapid prototype is in the word rapid.

(4) We can combine waterfall and rapid prototyping, by using rapid prototyping to find out the client's requirements.


Incremental Model


Incremental model

A build consists of code pieces from various modules interacting to provide a specific functionality.

(1) Each build is designed, coded and integrated into the software structure that is tested as a whole.

(2) A typical product will consist of 10 to 50 builds. With the incremental model, something will be working within weeks, with the rest delivered incrementally.

(3) Product can be introduced into the client's organization gradually.

(4) Problems of integration, changes in requirements, "shooting at a moving target".


Spiral Model


Spiral Model

(1) The essential concept is to minimize risks by the repeated use of prototypes and other means.

(2) Unlike other models, at every stage risk analysis is performed. Risk may be cost overruns, schedule delays, etc.

(3) This model, invented by Boehm, is intended primarily for internal development of large-scale software.


Capability Maturity Model

CMM is not a software process model. Instead, it is a strategy for improving the software process.

(1) CMM assists organizations in providing the infrastructure for a disciplined and mature software process. The CMM strategy is to improve the management of the software process, in the belief that this will lead to improvements in techniques.

(2) Maturity Levels:

Maturity Level           Characterization
--------------           ----------------
1. Initial               Ad hoc process
2. Repeatable            Basic project management
3. Defined level         Process definition
4. Managed level         Process measurement
5. Optimizing level      Process control

(3) An organization can assess maturity using a series of questionnaires developed by CMU's SEI (Software Engineering Institute). Thus this approach is good for organization which must access software procurement.

(4) The software maturity model emphasizes measurement, training and retraining of software personnel, and quality control of the software process. But it also increases productivity, as a software development organization moves up to higher level of maturity.


ISO 9000

(1) ISO 9000 is not just a software standard. It can also be used to certify an organization. It emphasizes documentation.

(2) ISO 9000 emphasizes documenting the process in both words and pictures to ensure consistency and comprehensibility.

(3) Like Software Maturity Model, ISO 9000 also emphasizes measurement.


Class Room Discussion

Discuss the sort of product that would be an ideal application for the (a) waterfall, (b) rapid prototyping, (c) incremental, (d) spiral model. For each case one person can present the advantages of a certain model for a certain application, and another person can try to present the disadvantages.

Examples: Payroll, electronic game, airline reservation, AI system to recognize handwriting, total quality management system for managing a very large company, teleconferencing system, etc.

 

Software Engineering The Software Life Cycle

The goal of software engineering is to develop software that satisfies and possibly exceeds the customer's expectations, is developed in a timely and economical fashion, and is resilient to change and adaptation. Such software

This document provides an overview of the software engineering process and although the process is described in terms of phases, the phases are usually, iterative, incremental and to some extent, concurrent.  When the phases are sequential, the life-cycle is called the waterfall model, when the phases are sequential and iterated, the life-cycle is called the spiral model.  The spiral model is superior to the waterfall model when resources are limited.

Conceptualization Phase

Conceptualization produces a statement of the problem and the desired solution. The output of the conceptualization phase is a requirements document.

For most programming exercises, there is no conceptualization phase, the requirements document is the problem assigned as a programming exercise.

Analysis Phase

Analysis starts with the requirements and produces a specification of what the system does. The output of the analysis phase is a specification document.

For most programming exercises, the analysis phase

Design Phase

Design begins with the specification and produces a description of how the system will be built from implementation-oriented components. The output of the design phase is a design document.

For most programming exercises, the design phase

Implementation Phase

Implementation begins with the design and produces an encoding of the design in a programming language to produce a working system. The output of the implementation phase is code.

For most programming exercises, the implementation phase should be a straight forward translation of the design into code and the program should be thoroughly tested for compliance with the specifications.

Maintenance Phase

Maintenance begins when the system is put into service and is concerned with managing the evolution of the system in response to changing requirements.

For most programming exercises, there is no maintenance phase.

Example

Requirements
A program to compute the circumference of a circle given its radius.
Specification
Users will invoke the program via the command circle which then prompts the user for input. Upon receiving the input, the program displays the result and terminates. The data objects required by the program are the radius and the circumference which are related through the formula: Circumference = 2 Pi radius. They should be floating point numbers. The value of Pi will be a constant internal to the program. In addition, a prompt for user input and labeling of the program output is required.

In the following sample run of the program, the system prompt is > and user input is in italics.

> circle

Enter the radius: 34.56

The circumference is: 1953.33

>

Errors: Given a negative value for a radius the program will compute a negative circumference. Given non-numeric input, the program behavior is unpredictable.

Design
Data Structures
The constant Pi of value 3.14, the variable radius of type floating point.
Algorithms
Prompt and read the input, the formula C=2 Pi R, for computing the circumference, implemented as a function, and labeling of the output.
Program Structure
  1. GetInput ( radius )
    1. Display prompt
    2. Read radius
  2. DisplayResult ( Circumference( radius ) )

Code (C++)

/***********************************************************************
Description: A program to compute the circumference of a circle 
Input: The radius of the circle 
Output: Prompt for input, labeled circumference of the circle
Programmer: A. Aaby
Date: January 13, 1993
Revision History:
************************************************************************/
#include <iostream.h>
/***********************************************************************
The Get Input Function 

Description: Prompts for input, input must be a real number
or an integer.  Other input may cause the program to abort.
Precondition: None
Postcondition: The parameter, r, is a number
************************************************************************/
void GetInput(float &r)
{
    cout << "Enter the radius: ";
    cin >> r;
}
/************************************************************************
Function implementing the formula C = 2*Pi*R 

Precondition: r is a real number 
Postcondition: Circumference = 2*Pi*r 
*************************************************************************/
void Circumference(float &r, float &C)
{
    float Pi = 3.14;
    C = 2*Pi*r;
}
/************************************************************************
The Display Result Function 

Precondition: parameter C must be a number
Postcondition: C is printed, labeled as the circumference  of a circle
*************************************************************************/
void DisplayResult(float &C)
{
    cout << endl << "The circumference is: " << C;
}
/************************************************************************
The Body of the program  
*************************************************************************/
void main()
{
    float C = 0,r = 0;
    GetInput(r);
    Circumference(r,C);
    DisplayResult(C);
}
Code (Pascal)
PROGRAM Circle (Input, Output);

{***********************************************************************
Description: A program to compute the circumference of a circle 
Input: The radius of the circle 
Output: Prompt for input, labeled circumference of the circle
Programmer: A. Aaby
Date: January 13, 1993
Revision History:
************************************************************************}

CONST Pi = 3.14; { an approximation to pi }

VAR radius : REAL; { the radius of the circle} 

{***********************************************************************
The Get Input Procedure  

Description: Prompts for input, input must be a real number
or an integer.  Other input may cause the program to abort.
Precondition: None
Postcondition: The parameter, R, is a number
************************************************************************}

PROCEDURE GetInput( VAR r : REAL );

   BEGIN
      Write( 'Enter the radius: ');
      Readln( r )
   END;

{************************************************************************
Function implementing the formula C = 2*Pi*R 

Precondition: R is a real number 
Postcondition: Circumference = 2*Pi*R 
*************************************************************************}

FUNCTION Circumference( r : REAL ) : REAL;

   BEGIN
      Circumference := 2*Pi*r
   END;

{************************************************************************
The Display Result Procedure  

Precondition: parameter C must be a number
Postcondition: C is printed, labeled as the circumference  of a circle
*************************************************************************}

PROCEDURE DisplayResult( c : REAL );

   BEGIN
      Writeln( 'The circumference is: ', c:5:2 )
   END;

{************************************************************************
The Body of the program  
*************************************************************************}

BEGIN

   GetInput(radius);
   DisplayResult(Circumference(radius))

END.
Validation
The program is validated by providing sample runs of the program using positive and negative integers and real numbers which demonstrate the range and precision of the program.