an introduction to software engineering. software engineering is concerned with theories, methods...

49
An Introduction to Software Engineering

Upload: adele-reynolds

Post on 19-Jan-2018

217 views

Category:

Documents


0 download

DESCRIPTION

Course Themes 1. Leadership of large software projects  Software as a product Clients and their needs Quality  Requirements and specification Usability Evolution  Project management Personnel management Economic, legal, and social factors

TRANSCRIPT

Page 1: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

An Introduction to Software Engineering

Page 2: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

Software engineering is concerned with theories, methods and tools for professional software development

Software engineering

Page 3: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

Course Themes1. Leadership of large software projects

Software as a product Clients and their needs Quality Requirements and specification Usability Evolution Project management Personnel management Economic, legal, and social factors

Page 4: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

Course Themes2. Large and very large systems

Software design Software architecture Object-oriented design Dependable systems Reliability Verification

Page 5: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

FAQs about software engineering

What is software? What is software engineering? What is the difference between software engineering

and computer science? What is the difference between software engineering

and system engineering? What is a software process? What is a software process model?

Page 6: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

FAQs about software engineering

What are the costs of software engineering? What are software engineering methods? What is CASE (Computer-Aided Software Engineering) What are the attributes of good software? What are the key challenges facing software

engineering?

Page 7: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

What is software?

Computer programs and associated documentation

Software products may be• Generic - developed to be sold to a range of

different customers• Bespoke (custom) - developed for a single

customer according to their specification• Embedded

• Built into hardware• Hard to change

Page 8: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

Software products Generic products

• Stand-alone systems that are marketed and sold to any customer who wishes to buy them.

• Examples – PC software such as editing, graphics programs, project management tools; CAD software; software for specific markets such as appointments systems for dentists.

Customized products• Software that is commissioned by a specific customer to

meet their own needs. • Examples – embedded control systems, air traffic control

software, traffic monitoring systems.

8

Page 9: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

Software Applications1. System software: such as compilers, editors, file management2. Application software: stand-alone programs for specific needs. 3. Engineering/scientific software: such as automotive stress analysis, molecular biology, orbital dynamics etc 4. Embedded software resides within a product or system. (key pad control of a microwave oven, digital function of dashboard display in a car)5. Product-line software focus on a limited marketplace to address mass consumer market. (word processing, graphics, database management)6. WebApps (Web applications) network centric software :remote database and business applications. 7. AI software Robotics, expert system, pattern recognition game playing

Page 10: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

Software Engineering

• Software Engineering is the science and art ofbuilding significant software systems that are:

1) on time2) on budget3) with acceptable performance4) with correct operation.

Page 11: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

What is Software Engineering?

Some Definitions and Issues

“state of the art of developing quality software on time and within budget”

Trade-off between perfection and physical constraints• SE has to deal with real-world issues

State of the art!• Community decides on “best practice” + life-long education

Page 12: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

What is Software Engineering?

“multi-person construction of multi-version software” Team-work

• Scale issue (“program well” is not enough) + Communication Issue

Successful software systems must evolve • Change is the norm, not the exception

Page 13: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

13

Why Study Software Engineering?

To acquire skills to develop large programs. • Exponential growth in complexity and

difficulty level with size.• The ad hoc approach breaks down

when size of software increases

Page 14: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

What is the difference between software engineering and system engineering?

System engineering is concerned with all aspects of computer-based systems development including hardware, software and process engineering. Software engineering is part of this process

System engineers are involved in system specification, architectural design, integration and deployment

Page 15: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

What is a software process?

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

Generic activities in all software processes are:• Specification - what the system should do and its

development constraints• Development - production of the software system• Validation - checking that the software is what the

customer wants• Evolution - changing the software in response to changing

demands

Page 16: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

Engineering Process Model

Specification: Set out the requirements and constraints on the system.

Design: Produce a model of the system. Manufacture: Build the system. Test: Check the system meets the required

specifications. Install: Deliver the system to the customer and

ensure it is operational. Maintain: Repair faults in the system as they

are discovered.

Page 17: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

Component Diagram

Page 18: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

Deployment Diagram

Page 19: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

Collaboration Diagram

Page 20: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

Statechart Diagram

Page 21: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

Activity Diagram

Page 22: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

What is a software process model?

A simplified representation of a software process, presented from a specific perspective

Examples of process perspectives are• Workflow perspective - sequence of activities• Data-flow perspective - information flow• Role/action perspective - who does what• Waterfall• Evolutionary development• Formal transformation• Integration from reusable components

Page 23: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

Generic Software Process Models Waterfall

• Separate and distinct phases of specification and development

Evolutionary• Specification and development are interleaved

Formal Transformation• A mathematical system model is formally transformed to

an implementation Reuse-based

• The system is assembled from existing components

Page 24: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

Waterfall Process ModelRequirements

definition

System andsoftware design

Implementationand unit testing

Integration andsystem testing

Operation andmaintenance

Page 25: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

Evolutionary Process Model

Validation Finalversion

Development Intermediateversions

Specification Initialversion

Outlinedescription

Concurrentactivities

Page 26: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

Spiral Process Model

Riskanalysis

Riskanalysis

Riskanalysis

Riskanalysis Proto-

type 1

Prototype 2Prototype 3

Opera-tionalprotoype

Concept ofOperation

Simulations, models, benchmarks

S/Wrequirements

Requirementvalidation

DesignV&V

Productdesign Detailed

design

CodeUnit test

IntegrationtestAcceptance

testService Develop, verifynext-level product

Evaluate alternativesidentify, resolve risks

Determine objectivesalternatives and

constraints

Plan next phase

Integrationand test plan

Developmentplan

Requirements planLife-cycle plan

REVIEW

Page 27: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

Software Quality... Usability

• Users can learn it and fast and get their job done easily Efficiency

• It doesn’t waste resources such as CPU time and memory Reliability

• It does what it is required to do without failing Maintainability

• It can be easily changed Reusability

• Its parts can be used in other projects, so reprogramming is not needed

Page 28: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

28

Emergence of Software Engineering

Early Computer Programming (1950s):• Programs were being written in

assembly language. • Programs were limited to about a

few hundreds of lines of assembly code.

Page 29: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

Early Computer Programming (50s)

Every programmer developed his own style of writing programs:• according to his intuition

(exploratory programming).

Page 30: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

Software development style was still exploratory.

Typical program sizes were limited to a few thousands of

lines of source code.

High-Level Language Programming (Early 60s)

Page 31: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

31

Control Flow-Based Design (late 60s)

Size and complexity of programs increased further:• exploratory programming style proved

to be insufficient. Programmers found:

• very difficult to write cost-effective and correct programs.

Page 32: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

Control Flow-Based Design (late 60s)

Programmers found:• programs written by others very

difficult to understand and maintain.

Page 33: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

Control Flow-Based Design (late 60s)

Using flow charting technique: • one can represent and design a

program's control structure. • Usually one understands a

program:• by mentally simulating the program's execution sequence.

Page 34: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

Control Flow-Based Design (Late 60s)

It was found:• GO TO ) JUMP ( statements makes

control structure of a program messy• GO TO statements alter the flow of

control arbitrarily. • The need to restrict use of GO TO

statements was recognized.

Page 35: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

Control Flow-Based Design (Late 60s)

But, soon it was conclusively proved: A program is called structured • only three programming constructs are

sufficient to express any programming logic:• sequence (e.g. a=0;b=5;)• selection (e.g.if(c=true) k=5 else m=5;)• iteration (e.g. while(k>0) k=j-k;)

Page 36: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

Data Structure-Oriented Design (Early 70s)

Soon it was discovered:• it is important to pay more

attention to the design of data structures of a program • than to the design of its control structure.

Page 37: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

37

Data Flow-Oriented Design (Late 70s)

Data flow-oriented techniques advocate: • the data items input to a system

must first be identified, • processing required on the data

items to produce the required outputs should be determined.

Page 38: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

Data Flow Model of a Car Assembly Unit

FitEngine

Paint and Test

FitWheels

FitDoors

Chassis Store

Door Store

Wheel Store

Engine Store

Car

Partly Assembled Car

Assembled Car

Chassis with Engine

Page 39: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

Simple design toolsSimple design tools

• State diagram

Page 40: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

40

Object-Oriented Design (80s)

Object-oriented technique:• an intuitively appealing design

approach: • natural objects (such as employees,

pay-roll-register, etc.) occurring in a problem are first identified.

Page 41: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

41

Object-Oriented Design (80s)

Relationships among objects:• such as composition, reference,

and inheritance are determined. Each object essentially acts as

• a data hiding (or data abstraction) entity.

Page 42: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

When software projects go wrongWhen software projects go wrong

• London Ambulance Service– 1992, computerised ambulance despatch system fails

• Therac-25– 2 people died and several others exposed to dangerous levels of

radiation because of software flaws in radiotherapy device

• OSIRIS– £5M University financial package– Expenditure to date more like £20-25M

• NPfIT?– NHS £12 billion IT project

• comp.risks is a great source of others...

Page 43: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

TestingTesting cannot show the absence of defects,

it can only show that software defects are present.

1. Testing is a process of executing a program with the intent of finding an error.

2. A good test case is one that has a high probability of finding an as yet undiscovered error.

3. A successful test is one that uncovers an as yet undiscovered error.

Page 44: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

Testing Methods

Black-box testing• Knowing the specified function that a product has been

designed to perform, tests can be conducted that demonstrate each function is fully operational.

White-box or glass-box testing• Knowing the internal workings of a product, tests can be

conducted to ensure that "all the gears mesh".1. independent paths at least once2. logical decisions both true and false3. loops4. internal data structures

Page 45: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

Design patterns

Programs regularly employ similar design solutions Idea is to standardise the way these are implemented

• Code re-use• Increased reliability• Fewer errors, shorter development time

An array is special case of a container type• Way of storing a collection of possibly ordered elements.• List, stack, queue, double-ended list, etc

Templates in C++ offer a way of providing libraries to implement these standard containers

Page 46: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

Future ExperienceWhat will you be doing one year from now?

Ten years from now?

Page 47: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

© Oscar Nierstrasz

ESE — Introduction

ESE 1.47

Course scheduleWeek Lesson

1 Introduction — 2 The Software Lifecycle3 Project Management4 Requirements Collection5 Waterfall lifecycle model6 Iterative model7 Agile model8 Modeling Objects and Classes9 UML

10 Software Architecture11 User Interface Design12 Software Metrics13 Software Quality

Software Validation

Page 48: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

Projects

Project teams, about 3 to 5 people.

Select your own project, any branch of software engineering

Real project for real client who intends to use the software in production.

Presentations:requirementsdesignfinal

Page 49: An Introduction to Software Engineering. Software engineering is concerned with theories, methods and tools for professional software development Software

Client (a.k.a Customer)

The client provides resources and expects some product in return.

Client satisfaction is the primary measurement of success.

Question: Who is the client for Microsoft Excel?