Top Banner
2007/2008 SOFT3280 Slide 1 Software Engineering Part1 - Introduction
33
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Slide 1 2007/2008SOFT3280 Software Engineering Part1 - Introduction.

2007/2008 SOFT3280 Slide 1

Software Engineering

Part1 - Introduction

Page 2: Slide 1 2007/2008SOFT3280 Software Engineering Part1 - Introduction.

2007/2008 SOFT3280 Slide 2

Software Engineering – Part 1

• State what is meant by the term software engineering?• Describe the software process or lifecycle• Explain the importance of Software Development• List the attributes of well designed software• Describe the following Software Development process

models:– Waterfall– Evolutionary or iterative development– Prototyping– Extreme programming– Spiral

Page 3: Slide 1 2007/2008SOFT3280 Software Engineering Part1 - Introduction.

2007/2008 SOFT3280 Slide 3

Problems with Software

• Developing software for large-scale systems is much more difficult than development for smaller projects:– Complexity

the more complex a task the more likely errors will be introduced. Modularisation of a large, complex task into smaller sub-tasks can reduce the overall complexity

– Size:as the size of a project increases, the number of individuals involved increases leading to increased communicational complexity and thus higher probability of errors occurring. This requires a clear medium of communication that is reliable and complete.

– Timescales:Quality of software versus cost of lateness

– Cost:software is now the predominant factor in computer system cost, far exceeding hardware cost.

– Management:Good project planning vital to development of quality software on time.

Page 4: Slide 1 2007/2008SOFT3280 Software Engineering Part1 - Introduction.

2007/2008 SOFT3280 Slide 4

Case Study from SommervilleTherac-25

• Linear accelerators create high- energy beams that can destroy tumors with minimal impact on the surrounding healthy tissue

• Therac 25 was the first linear accelerator with dosage controlled solely by software (as opposed to hardware)

Ref: sommerville

Page 5: Slide 1 2007/2008SOFT3280 Software Engineering Part1 - Introduction.

2007/2008 SOFT3280 Slide 5

1983: Pre-release Safety Analysis

• Programming errors have been reduced by extensive testing on a hardware simulator and under field conditions on teletherapy units. Any residual software errors are not included in the analysis.

• Program software does not degrade due to wear, fatigue, or reproduction process.

• Computer execution errors are caused by faulty hardware components and by "soft" (random) errors induced by alpha particles and electromagnetic noise.

Ref: sommerville

Page 6: Slide 1 2007/2008SOFT3280 Software Engineering Part1 - Introduction.

2007/2008 SOFT3280 Slide 6

and then …

• 1983: First Therac 25 installed

• 1985-1987: Six massive-overdose accidents due to “software error” are reported. Overdoses caused severe burns and death.

• 1987: Recalled for extensive design changes, including hardware to safeguard against software errors in dosage.

Ref: sommerville

Page 7: Slide 1 2007/2008SOFT3280 Software Engineering Part1 - Introduction.

2007/2008 SOFT3280 Slide 7

US Federal Aviation Administration

• 1981: FAA announced plans to modernize air-traffic control.• 1985: IBM awarded contract. System estimate to have 1.5 million

lines of code, cost $2.5 billion, and be deployed by 1991.• 1987: Revised cost $4.3 billion, deployment slipped to 1995.• 1994: FAA decided that the project would never be completed, and

cancelled it. Net loss $1.5 billion• Main issue causing project delay and cost growth was the lack of

coordination between the FAA and air traffic controllers and service technicians during the early stages of development - led to design that could significantly impact the controllers’ ability to control aircraft.

Ref: sommerville

Page 8: Slide 1 2007/2008SOFT3280 Software Engineering Part1 - Introduction.

2007/2008 SOFT3280 Slide 8

Stats on software projects

• 31.1% are cancelled before they are finished• 52.7% overrun their cost estimates by at least 189%• 33.3% overrun their time estimates by 100%-200%• 94% of all projects do a “restart”

J. Johnson, “Creating Chaos,” American Programmer, July 1995

Ref: sommerville

Page 9: Slide 1 2007/2008SOFT3280 Software Engineering Part1 - Introduction.

2007/2008 SOFT3280 Slide 9

So why do projects fail

• Unrealistic Schedules • Inappropriate Staffing • Changing Requirements During Development • Poor-Quality Work • Believing in Magic

Ref: sommerville

Page 10: Slide 1 2007/2008SOFT3280 Software Engineering Part1 - Introduction.

2007/2008 SOFT3280 Slide 10

What is Software Engineering?

“Software engineering is concerned with theories, methods and tools for the systematic production and maintenance of software products that are developed and maintained on time and within cost estimates.”

Ref: sommerville

Page 11: Slide 1 2007/2008SOFT3280 Software Engineering Part1 - Introduction.

2007/2008 SOFT3280 Slide 11

Software Engineering

• A systematic approach to the development of medium to large-scale software systems, usually involving teams of programmers. – Good software development techniques required to minimise

programming errors and localise the scope of errors.

– The development of the documentation necessary to install, use, develop and maintain the programs is crucial;

– Cost-effective software development

• A technological and a managerial discipline. • Aims to reduce cost of software development by

– Placing greater emphasis on systematic development

– Finding out the user’s requirements

– Specifying the system requirements in some formal/semi-formal way

– Producing prototypes

– Trying to ensure error free code

Page 12: Slide 1 2007/2008SOFT3280 Software Engineering Part1 - Introduction.

2007/2008 SOFT3280 Slide 12

Software Cost!

• Bear in mind that ;– it is 100 times more expensive to redesign a problem

after delivery of the product than to identify the user’s requirements correctly at the start of the design,

– maintenance costs are typically twice the development,

– about 15% of development costs are in coding – software is more than CODE.

– and it is obvious that effort spent in a systematic approach (i.e. engineering) from the start of a project will not be wasted.

Page 13: Slide 1 2007/2008SOFT3280 Software Engineering Part1 - Introduction.

2007/2008 SOFT3280 Slide 13

Aim of software engineeringThe aim is to develop software which is:

• RELIABLE – Software should perform as expected by the user. This is particularly

important in safety or life-critical areas such as Avionics, chemical plant, medical systems.

• MAINTAINABLE – Software should be written so that changes can be made without undue

cost.

• EFFICIENT – Software should not make wasteful use of system resources.

• USABLE – Software should have an appropriate user interface. For example, ease

of use, ease of learning, presentation, attractive.

• SECURE– This includes confidentiality and access rights.

Page 14: Slide 1 2007/2008SOFT3280 Software Engineering Part1 - Introduction.

2007/2008 SOFT3280 Slide 14

What is a Software Process/Software LifeCycle?

• A set of activities whose goal is the development or evolution of software.

• Generic activities in all software processes are: – Requirement specification/analysis– Design – Implementation – Testing– Evolution

Page 15: Slide 1 2007/2008SOFT3280 Software Engineering Part1 - Introduction.

2007/2008 SOFT3280 Slide 15

Life Cycle Model

• Several different activities may be carried out in each life cycle phase.

• Entry and exit criteria defined for every phase. • A phase can start only if its phase-entry criteria have

been satisfied. • A phase is considered to be complete only when all its

exit criteria are satisfied.

Page 16: Slide 1 2007/2008SOFT3280 Software Engineering Part1 - Introduction.

2007/2008 SOFT3280 Slide 16

Software Development Lifecycle Models

• There are a number of models for software development lifecycle, for example:– Build and fix model– Classic Waterfall Model – Incremental model– Spiral model– Rapid prototyping– Extreme Programming

Page 17: Slide 1 2007/2008SOFT3280 Software Engineering Part1 - Introduction.

2007/2008 SOFT3280 Slide 17

Build and fix model

• “trial and error” approach

• adequate for simple software programs

• unacceptable for large and complex systems

Build 1stversion

Modify untilcustomer is

satisfied

Use

Page 18: Slide 1 2007/2008SOFT3280 Software Engineering Part1 - Introduction.

2007/2008 SOFT3280 Slide 18

Specification

Design

Implementation

Maintenance

Revised Programs

Programs

Design Documentation

Software Specification Documentation

User Requirement Documentation

RequirementAnalysis

QualityAssurance

Waterfall Model

Page 19: Slide 1 2007/2008SOFT3280 Software Engineering Part1 - Introduction.

2007/2008 SOFT3280 Slide 19

Waterfall Model

• Advantages: – Organised approach, provides robust separation of phases– Reflects common engineering practice

• Disadvantages:– Doesn’t cope well with changes required by the client – Development teams might wait for each other– A working version of the product is available only late

• Applicability:– When requirements are well known and few changes are likely to

be needed– Can be used also for parts of larger software systems

Page 20: Slide 1 2007/2008SOFT3280 Software Engineering Part1 - Introduction.

2007/2008 SOFT3280 Slide 20

Process Iteration

• System requirements ALWAYS evolve in the course of a project so process iteration where earlier stages are reworked is always part of the process for large systems.

• Iteration can be applied to any of the generic process models.

Page 21: Slide 1 2007/2008SOFT3280 Software Engineering Part1 - Introduction.

2007/2008 SOFT3280 Slide 21

Iterative Development

• Waterfall model breaks down a project based on activities: – requirement analysis, design, coding and testing.

• Iterative development breaks down a project by subsets of functionality.

• Overall lifecycle composed of several iterations– each iteration a self-contained mini-project composed of activities such

as requirement analysis, design, coding and testing.

• Iteration Release – At the end of each iteration

– a stable integrated and tested system with a subset of the final functionality completed.

– provide a baseline for the developer

– usually not released to the customer until the final iteration.

Page 22: Slide 1 2007/2008SOFT3280 Software Engineering Part1 - Introduction.

2007/2008 SOFT3280 Slide 22

Iterative Development Approaches

Evolutionary

Incremental

Spiral

Page 23: Slide 1 2007/2008SOFT3280 Software Engineering Part1 - Introduction.

2007/2008 SOFT3280 Slide 23

Evolutionary development

• Main characteristics:– The phases of the software construction are interleaved– Feedback from the user is used throughout the entire process– The software product is refined through many versions

Concurrentactivities

ValidationFinalversion

DevelopmentIntermediate

versions

SpecificationInitial

version

Outlinedescription

Page 24: Slide 1 2007/2008SOFT3280 Software Engineering Part1 - Introduction.

2007/2008 SOFT3280 Slide 24

Evolutionary development

• Exploratory development – Objective is to work with customers and to evolve a final system

from an initial outline specification. Should start with well-understood requirements and add new features as proposed by the customer.

• Throw-away prototyping– Objective is to understand the system requirements. Should start

with poorly understood requirements to clarify what is really needed.

Page 25: Slide 1 2007/2008SOFT3280 Software Engineering Part1 - Introduction.

2007/2008 SOFT3280 Slide 25

Evolutionary development

• Advantages:– Deals constantly with changes

– Provides quickly an initial version of the system

– Customer input throughout development yields system closer to their (immediate) needs

• Problems– Lack of process visibility, not well-supported by documentation;

– System’s structure can be corrupted by continuous change;

– Special skills (e.g. in languages for rapid prototyping) may be required.

• Applicability– For small or medium-size interactive systems;

– For parts of large systems (e.g. the user interface);

– For short-lifetime systems.

Page 26: Slide 1 2007/2008SOFT3280 Software Engineering Part1 - Introduction.

2007/2008 SOFT3280 Slide 26

Incremental delivery• Rather than deliver the system as a single delivery, the development and

delivery is broken down into increments with each increment delivering part of the required functionality.

• User requirements are prioritised and the highest priority requirements are included in early increments.

• Once the development of an increment is started, the requirements are frozen though requirements for later increments can continue to evolve.

Define Outline requirements

Assign Requirements to Increments

Design System Architecture

Develop System Increment

Validate Increment

Integrate Increment

Validate System

Final System

System incomplete

Page 27: Slide 1 2007/2008SOFT3280 Software Engineering Part1 - Introduction.

2007/2008 SOFT3280 Slide 27

Incremental delivery advantages

• Customer value can be delivered with each increment so system functionality is available earlier; – e.g. ATM 1)withdraw cash 2)lodge cash 3)show balance 4)print

statement 5)change PIN number 6)Top-up mobile phone

• Early increments act as a prototype to help elicit requirements for later increments.

• Lower risk of overall project failure.• The highest priority system services tend to receive the

most testing.

Page 28: Slide 1 2007/2008SOFT3280 Software Engineering Part1 - Introduction.

2007/2008 SOFT3280 Slide 28

Spiral development• Combines features of the rapid

prototyping and waterfall models.• Process is represented as a spiral

rather than as a sequence of activities with backtracking.

• The project starts at the centre of the spiral and builds progressively more complete version of the software as the spiral expands outwards.

• Each loop in the spiral represents a phase in the process and is split into 4 sectors.

• No fixed phases such as specification or design - loops in the spiral are chosen depending on what is required.

• Risks are explicitly assessed and resolved throughout the process leading to a risk based development model.

Determineobjectives

RiskAnalysis

Engineering/Developmen

t

Plan nextphase

Customerreview

Page 29: Slide 1 2007/2008SOFT3280 Software Engineering Part1 - Introduction.

2007/2008 SOFT3280 Slide 29

Spiral model of the software processRisk

Analysis

Risk Analysis

Risk Analysis

Risk Analysis

OperationalPrototype

Prototype 3

Prototype 2

Prototype 1REVIEW

Determine objectivesalternatives and

constraints

Evaluate alternatives ,identify , resolve risks

Plan next phaseDelvelop, verifynext-level product

Requirements planLife-cycle plan

Development plan

Integration and test plan

Conceptof

operationSW

requirements

Requirement validation

Product design

Design validationand verification

Detaileddesign

Code

Unit test

Integrationtest

Acceptancetest

Service

Page 30: Slide 1 2007/2008SOFT3280 Software Engineering Part1 - Introduction.

2007/2008 SOFT3280 Slide 30

Spiral model sectors

• Objective setting– Specific objectives for the phase are identified.

• Risk assessment and reduction– Risks are assessed and activities put in place to reduce the key

risks.

• Development and validation– A development model for the system is chosen which can be any

of the generic models.

• Planning– The project is reviewed and the next phase of the spiral is

planned.

Page 31: Slide 1 2007/2008SOFT3280 Software Engineering Part1 - Introduction.

2007/2008 SOFT3280 Slide 31

Spiral model features

• Advantages:– Risk reduction mechanisms are in place– Supports iteration and reflects real-world practices– Systematic approach

• Disadvantages:– Requires expertise in risk evaluation and reduction– Complex, relatively difficult to follow strictly – Applicable only to large systems

• Applicability:– Typically used for large, expensive projects.

Page 32: Slide 1 2007/2008SOFT3280 Software Engineering Part1 - Introduction.

2007/2008 SOFT3280 Slide 32

Prototyping

• Construction of prototypes is standard practice in engineering. • Requirements can be validated by prototyping, thus reducing risk. • Prototypes are used during feasibility studies and are often

constructed from reusable parts. • Typically used for 4GL development projects.

Page 33: Slide 1 2007/2008SOFT3280 Software Engineering Part1 - Introduction.

2007/2008 SOFT3280 Slide 33

Extreme Programming

• This is a so called “agile method” developed in the 1990’s for smaller systems which have to be developed quickly

• allow the development team to concentrate on the software rather than on the design and documentation

• Agile methods rely on an iterative approach as in the Incremental Model but with the end user involved very closely with the developers throughout the development process – the user is a member of the development team.

• The user is continually monitoring output, providing feedback and modifying his requirements specification as required.

• The customer is involved to extreme levels in frequent iterative development - hence the title.

• It is approached through the use of scenarios- “what will happen if?”.