computing higher - sd process – topic 2 st andrew’s high school 2004 1 unit 2 software...

35
1 Computing Higher - SD Process – Topic 2 St Andrew’s High School 2004 Unit 2 Software Development Process

Upload: chana-burley

Post on 01-Apr-2015

214 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Computing Higher - SD Process – Topic 2 St Andrew’s High School 2004 1 Unit 2 Software Development Process

1

Computing Higher - SD Process – Topic 2

St Andrew’s High School 2004

Unit 2Software Development Process

Page 2: Computing Higher - SD Process – Topic 2 St Andrew’s High School 2004 1 Unit 2 Software Development Process

2

Computing Higher - SD Process – Topic 2

St Andrew’s High School 2004

Features of the SD Process - Introduction

In the development of software, the three aspects that the developer must consider are:Data Processes Human computer interfaceIn traditional structured design, the primary tasks are to focus on the processes. A process is the work that a program carries out on data or in response to inputs.Sometimes there will only be an outline of the problem. At other times, a specification will be available. The specification must be agreed with the clients. Work on the problem and the solution is often carried out by a group of people, called the development team.The aim of the team is to produce a new software system that will solve the problem.

Page 3: Computing Higher - SD Process – Topic 2 St Andrew’s High School 2004 1 Unit 2 Software Development Process

3

Computing Higher - SD Process – Topic 2

St Andrew’s High School 2004

Stages of the SD Process

The traditional software development process contains a sequence of stages. In this course we will consider the following stages:

Analysis

Design

Implementation

Testing

Documentation

Evaluation

Maintenance

Page 4: Computing Higher - SD Process – Topic 2 St Andrew’s High School 2004 1 Unit 2 Software Development Process

4

Computing Higher - SD Process – Topic 2

St Andrew’s High School 2004

Stages of the SD Process

An important aspect of the software development process is that it is an iterative process. An iterative process is one that incorporates feedback and involves an element of repetition. Ideally, you would start a process with the analysis and work through the stages in turn, doing everything only once. In practice, this happens rarely. People make mistakes; faults become apparent that can only be corrected by going back to an earlier stage of the process.

Page 5: Computing Higher - SD Process – Topic 2 St Andrew’s High School 2004 1 Unit 2 Software Development Process

5

Computing Higher - SD Process – Topic 2

St Andrew’s High School 2004

Stages of the SD Process - Analysis

Analysis is an attempt to understand a given problem, clearly and exactly, and to generate a solution. The outcome will be a software specification that is used as the basis for all subsequent work. The specification is an agreement between the client and the systems analyst on the scope and boundaries of the problem. Any assumptions and/or constraints of the problem should be detailed. This software specification may become part of the legal contract between the client and software development team.

Page 6: Computing Higher - SD Process – Topic 2 St Andrew’s High School 2004 1 Unit 2 Software Development Process

6

Computing Higher - SD Process – Topic 2

St Andrew’s High School 2004

Stages of the SD Process - Analysis

Questions to be asked at this stage would include:What are the new system requirements?What are the costs involved?How long will it take to implement?Details would be gathered by a variety of methods such as interviews, observation of the current system, inspection of the information sources (ie, examination of the existing system and all paperwork associated with it), and questionnaires.Analysis, sometimes called systems analysis, is the job of a specialist person – the systems analyst.Documentation Produced – The software specification (part of legal contract).

Page 7: Computing Higher - SD Process – Topic 2 St Andrew’s High School 2004 1 Unit 2 Software Development Process

7

Computing Higher - SD Process – Topic 2

St Andrew’s High School 2004

Stages of the SD Process - Design

The design process is methodical, using techniques such as structure charts and pseudo-code. The problem is approached by breaking it down into a collection of relatively small and simple tasks until it can’t be further refined. This approach is known as top-down design or stepwise refinement.

Page 8: Computing Higher - SD Process – Topic 2 St Andrew’s High School 2004 1 Unit 2 Software Development Process

8

Computing Higher - SD Process – Topic 2

St Andrew’s High School 2004

Stages of the SD Process - Design

The dev team attempt to make the design:-Robust – the resulting software should be able to cope with mistakes that users might make or unexpected conditions that might occur. These should not lead to wrong results or cause the program to hang. Eg the printer being out of paper, or a disc drive not being available because the user forgot to enter the floppy.Reliable - if it runs well, and is never brought to a halt by a design flaw. It should cope with errors and unexpected events during its execution. Possible outcomes of error encounter could be:

inform the user; die gracefully; recover reasonably within a minimum time

period. Free from design and coding bugs.

Page 9: Computing Higher - SD Process – Topic 2 St Andrew’s High School 2004 1 Unit 2 Software Development Process

9

Computing Higher - SD Process – Topic 2

St Andrew’s High School 2004

Stages of the SD Process - Design

Portability - can run on a variety on machine architectures under different operating systems with little or no modification. A portable program is one which is machine independent. The growth of the internet made this more of a problem. Solution lay in Java. Programs written in Java are compiled into bytecode that can be run using a Java interpreter. This is available for different machine platforms eg Apple Macs, PCs etc. A machine with a Java interpreter installed is Java-enabled. This approach works very well for small programs or applets on the Web, but interpreters tend to run slowly, so the porting of large computer programs remains a problem.

Page 10: Computing Higher - SD Process – Topic 2 St Andrew’s High School 2004 1 Unit 2 Software Development Process

10

Computing Higher - SD Process – Topic 2

St Andrew’s High School 2004

Stages of the SD Process - Design

Efficiency – the program does not use resources disproportionate to the size and scale of the program. Eg doesn’t use up the processor for longer than necessary, doesn’t use up too much RAM or hard disk space.Maintainability – subsequent changes can be effected easily and quickly. To help in this the program should be modular, readable, fully documented at each stage, use internal commentary, meaningful variable and meaningful procedure names.Fit for Purpose – does the program do what the client wants it to do? Does it meet the specification and fulfill the legal contract?

Page 11: Computing Higher - SD Process – Topic 2 St Andrew’s High School 2004 1 Unit 2 Software Development Process

11

Computing Higher - SD Process – Topic 2

St Andrew’s High School 2004

Stages of the SD Process - Design

One of the matters for decision at this point is that of the language of implementation and the Software Development Environment. Factors which may affect this decision are:-

• the portability of the resulting code i.e. can the software be moved to a different hardware platform and still work effectively

• expertise of the software development team• objects and operations identified in the design will

allow a languages objects and operations to be compared making sure the correct language is chosen to match the problem

Page 12: Computing Higher - SD Process – Topic 2 St Andrew’s High School 2004 1 Unit 2 Software Development Process

12

Computing Higher - SD Process – Topic 2

St Andrew’s High School 2004

Stages of the SD Process - Design

The Test Data is also constructed at this stage. The Test Harness created must test all possible cases including Normal, Boundary and Exceptions testing. (This will be discussed in detail later in these notes).

Page 13: Computing Higher - SD Process – Topic 2 St Andrew’s High School 2004 1 Unit 2 Software Development Process

13

Computing Higher - SD Process – Topic 2

St Andrew’s High School 2004

Stages of the SD Process - Design

Design Method 1 - Pseudo-CodePseudo-code is a cross between a programming language and English. It is sufficiently like English to allow you to concentrate initially on your program design without worrying about the complexities of the programming language and yet it contains enough programming language features to enable you to code your finished design quickly in your chosen program language. When designing and describing language facilities, you may find it helpful to use pseudo-code, although there are other methods used for describing the design of software, including flowcharts and structure diagrams.

Page 14: Computing Higher - SD Process – Topic 2 St Andrew’s High School 2004 1 Unit 2 Software Development Process

14

Computing Higher - SD Process – Topic 2

St Andrew’s High School 2004

Stages of the SD Process - Design

An example of Pseudo-code:-set counter to 0set total to 0REPEAT add 1 to counter add counter to totalUNTIL counter = 10 display total

Page 15: Computing Higher - SD Process – Topic 2 St Andrew’s High School 2004 1 Unit 2 Software Development Process

15

Computing Higher - SD Process – Topic 2

St Andrew’s High School 2004

Stages of the SD Process - Design

Design Method 2 - FlowchartsA flowchart is often used to illustrate an algorithm (set of instructions) to solve a problem. A flowchart is a diagram which uses different shapes and arrows to show the steps in a problem solution. Particular box shapes represent different data flow and control structures.

Page 16: Computing Higher - SD Process – Topic 2 St Andrew’s High School 2004 1 Unit 2 Software Development Process

16

Computing Higher - SD Process – Topic 2

St Andrew’s High School 2004

Stages of the SD Process - Design

Whenever the data is processed

Start or stop the flow of data

Whenever data is input or output

Whenever a decision is made

Stop

Calculate area using

height * base

Start

Inputheight

Inputbase

Display area

Page 17: Computing Higher - SD Process – Topic 2 St Andrew’s High School 2004 1 Unit 2 Software Development Process

17

Computing Higher - SD Process – Topic 2

St Andrew’s High School 2004

Stages of the SD Process - Design

Design Method 3 - Structure diagramA structure diagram uses linked boxes to represent

different sub-programs of the problem and are organised to show the hierarchy of each sub-program.

Page 18: Computing Higher - SD Process – Topic 2 St Andrew’s High School 2004 1 Unit 2 Software Development Process

18

Computing Higher - SD Process – Topic 2

St Andrew’s High School 2004

Stages of the SD Process - DesignCreating a phone directory which

you can search

Store the names and numbers in two lists

Repeat the following until “XXX” is typed

Ask for a nameFind the position of the

name in the listPrint the number stored

at that same position

Page 19: Computing Higher - SD Process – Topic 2 St Andrew’s High School 2004 1 Unit 2 Software Development Process

19

Computing Higher - SD Process – Topic 2

St Andrew’s High School 2004

Stages of the SD Process - Design

The box at the top describes what the whole program does.

The boxes below are arranged in logical order from left to right. Each box shows a different section of the program.

The box with a double line at each side shows a procedure or subroutine.

Documentation Produced - the Design of User Interface and on of the design methods of pseudo-code, flowchart or structure chart.

Page 20: Computing Higher - SD Process – Topic 2 St Andrew’s High School 2004 1 Unit 2 Software Development Process

20

Computing Higher - SD Process – Topic 2

St Andrew’s High School 2004

Stages of the SD Process - ImplementationAt this stage, the programming team will make use

of test data.This data is designed to check that the program works

properly, and that it is reliable and robust. Testing is often confused with the debugging of a program, but these are not the same, though they are very closely related.

Testing establishes the presence of faults in a program

Debugging is the finding and removing of these faults.Also at this stage will be included internal

documentation. This is commentary within the program to explain the various stages and to record any changes that might be implemented in the coding during debugging.

Page 21: Computing Higher - SD Process – Topic 2 St Andrew’s High School 2004 1 Unit 2 Software Development Process

21

Computing Higher - SD Process – Topic 2

St Andrew’s High School 2004

Stages of the SD Process - ImplementationStandard AlgorithmsMost projects will use certain standard algorithms.

Programmers need to be familiar with these common algorithms. Ones that you will become familiar with later include:

Linear searchingCounting occurrencesFinding maximum and minimum

Page 22: Computing Higher - SD Process – Topic 2 St Andrew’s High School 2004 1 Unit 2 Software Development Process

22

Computing Higher - SD Process – Topic 2

St Andrew’s High School 2004

Stages of the SD Process - ImplementationModule LibrariesIt is often possible to use, with or without alteration,

modules that have been previously written and have been retained in a module library. A module library will include code for these standard algorithms. Most development environments come with a large library of modules. Programmers can use these in the code they are developing. These libraries will include mathematical functions, modules for converting text to numbers, etc.

Documentation Produced - the structured listing (ie the formatted output of program code, formatted with white space, line numbers, indentation, comments).

Page 23: Computing Higher - SD Process – Topic 2 St Andrew’s High School 2004 1 Unit 2 Software Development Process

23

Computing Higher - SD Process – Topic 2

St Andrew’s High School 2004

Stages of the SD Process - Testing

Testing has several purposes. It should check that: The software meets the specification i.e. is correct

It is robustIt is reliable.

Testing follows a test plan or strategy, involving carefully selected test data, with a view to ensuring that a reliable product has been constructed. Important aspects would be:What part of the program is being tested?What is the expected output using suitable test

data?

Page 24: Computing Higher - SD Process – Topic 2 St Andrew’s High School 2004 1 Unit 2 Software Development Process

24

Computing Higher - SD Process – Topic 2

St Andrew’s High School 2004

Stages of the SD Process - Testing

Testing can never show that a program is correct. Even with extensive or exhaustive testing, it is almost certain that undetected errors exist. Testing can only demonstrate the presence of errors; it cannot demonstrate their absence. A program can be regarded as succeeding if it passes a test; the test can be regarded as succeeding if it makes the program fail.

Page 25: Computing Higher - SD Process – Topic 2 St Andrew’s High School 2004 1 Unit 2 Software Development Process

25

Computing Higher - SD Process – Topic 2

St Andrew’s High School 2004

Stages of the SD Process - Testing

Testing follows a test plan or strategy. With most software projects, the usual strategy is to test the software twice. The methods are called:Alpha testing is carried out when the code is roughly ready. The software programmers have made initial checks to ensure the specifications have been met. The code then goes to an independent testing team that have the task of formally checking the code. The members of the ITG were not involved with the design or implementation of the software and are not part of the client company. Beta testing where the software is tested by personnel outside the organisation orby certain members of the public. This is sometimes called acceptance testing.

Page 26: Computing Higher - SD Process – Topic 2 St Andrew’s High School 2004 1 Unit 2 Software Development Process

26

Computing Higher - SD Process – Topic 2

St Andrew’s High School 2004

Stages of the SD Process - Testing

Alpha testingData will be designed to test three aspects of the

program:Normal OperationBoundaryExceptions

Normal operation: data that the program has essentially been built to process; all outputs should be satisfactory.

Page 27: Computing Higher - SD Process – Topic 2 St Andrew’s High School 2004 1 Unit 2 Software Development Process

27

Computing Higher - SD Process – Topic 2

St Andrew’s High School 2004

Stages of the SD Process - Testing

Alpha testingBoundary testing: data to test that the program

functions properly with data at the extremes of its operation; for example, if a number entered is meant to be limited, the program’s performance is tested just within the limit, on the limit, and just beyond the limit; as another example, if a table is supposed to have a maximum number of elements, the program is tested to see if it can cope with exactly the maximum and if it can cope when an attempt is made to exceed the maximum.

Page 28: Computing Higher - SD Process – Topic 2 St Andrew’s High School 2004 1 Unit 2 Software Development Process

28

Computing Higher - SD Process – Topic 2

St Andrew’s High School 2004

Stages of the SD Process - Testing

Alpha testingExceptions testing: data that lie beyond the

extremes of the program’s normal operation; these should include a selection of what might be called silly data, to test the program’s robustness, that a user might enter in a moment of confusion or mischief.

A standard technique to identify potential errors is to conduct a dry run. This involves taking test data and a listing of the relevant part of the code, and calculating exactly what would happen to the data if it were to pass through that code. It is a pencil and paper exercise.

Page 29: Computing Higher - SD Process – Topic 2 St Andrew’s High School 2004 1 Unit 2 Software Development Process

29

Computing Higher - SD Process – Topic 2

St Andrew’s High School 2004

Stages of the SD Process - Testing

Beta testingThe idea is to subject a completed program to testing

under actual working conditions.If a program has been developed for use by particular

clients, it is installed on their site. The clients use the program for a given period and then report back to the development team. The process might be iterative, with the development team making adjustments to the software. When the clients regard the program’s operation as acceptable, the testing stage is complete.

Have you ever used a beta version of software before?

Page 30: Computing Higher - SD Process – Topic 2 St Andrew’s High School 2004 1 Unit 2 Software Development Process

30

Computing Higher - SD Process – Topic 2

St Andrew’s High School 2004

Stages of the SD Process - Documentation

The Documentation StageUsers will need to be able to read and learn about the

new system. The documentation should include a user guide for people who will be using the system, and a technical guide for those who will be maintaining it.

User GuideThe user guide contains information about how to

install, start and use software. It should also contain a list of commands and how to use them. Where there is a significant HCI, the guide will show each form, menu, and icon, and associated instructions about their use.

Page 31: Computing Higher - SD Process – Topic 2 St Andrew’s High School 2004 1 Unit 2 Software Development Process

31

Computing Higher - SD Process – Topic 2

St Andrew’s High School 2004

Stages of the SD Process - Documentation

Technical GuideThe technical guide will contain information about

the hardware and software requirements of the program. The hardware specification will include details of the processor type and speed, RAM required, RAM desired, monitor resolution, graphics/sound card specs etc. It will also contain instructions about configuring the program.

Other documentation is largely for the benefit of the development team and will include all the documents produced in the course of the development process. This documentation is essential for certain kinds of maintenance or for future revisions of the software. Final documentation will include a structured listing of the program.

Page 32: Computing Higher - SD Process – Topic 2 St Andrew’s High School 2004 1 Unit 2 Software Development Process

32

Computing Higher - SD Process – Topic 2

St Andrew’s High School 2004

Stages of the SD Process - Evaluation

The Evaluation StageEvaluation is the formal monitoring of a system to

ensure that it is performing its purpose accurately, efficiently, cost effectively and in a timely manner. The performance of the system must be matched against a given set of criteria such as the initial project specification.

The basis of evaluation is methods using techniques such as observation, interviews, and questionnaires.

The key criterion in evaluating a software product has to be whether it is fit for purpose, i.e. does it meet the original specification and allow the client to carry out their tasks?

Page 33: Computing Higher - SD Process – Topic 2 St Andrew’s High School 2004 1 Unit 2 Software Development Process

33

Computing Higher - SD Process – Topic 2

St Andrew’s High School 2004

Stages of the SD Process - Evaluation

The Maintenance StageThis, as a rule, is the most time consuming

stage. Software does not wear out but it usually needs subsequent modification. Some bugs or design shortcomings only become apparent over time. In addition changes might have to be made to adapt the system to new demands or legislation (data protection guidelines for example).

There are three types of software maintenance:CorrectiveAdaptivePerfective

Page 34: Computing Higher - SD Process – Topic 2 St Andrew’s High School 2004 1 Unit 2 Software Development Process

34

Computing Higher - SD Process – Topic 2

St Andrew’s High School 2004

Stages of the SD Process - Evaluation

Corrective maintenance is concerned with errors that escaped detection during testing but which occur during actual use of the program.

Adaptive maintenance is necessary when the program’s environment changes. It allows the authors to provide a program that responds to changes in the operating environment. For example, a change of operating system could require changes in the program, or a new printer might call for a new printer driver to be added to the program.

Perfective maintenance occurs in response to requests from the user to enhance the performance of the program. This may be due to changes in the requirements or new legislation.

Page 35: Computing Higher - SD Process – Topic 2 St Andrew’s High School 2004 1 Unit 2 Software Development Process

35

Computing Higher - SD Process – Topic 2

St Andrew’s High School 2004

Stages of the SD Process - Evaluation

Corrective maintenance is concerned with errors that escaped detection during testing but which occur during actual use of the program.

Adaptive maintenance is necessary when the program’s environment changes. It allows the authors to provide a program that responds to changes in the operating environment. For example, a change of operating system could require changes in the program, or a new printer might call for a new printer driver to be added to the program.

Perfective maintenance occurs in response to requests from the user to enhance the performance of the program. This may be due to changes in the requirements or new legislation.