Introduction to Software Engineering - جامعة نزوى fileRequirement 2% Specification 4%...

Post on 01-Nov-2019

1 views 0 download

Transcript of Introduction to Software Engineering - جامعة نزوى fileRequirement 2% Specification 4%...

Introduction to Software Engineering

Naeem Ali

University of Nizwa

Email: naeem@unizwa.edu.om

Outline of this presentation

• Scope of Software Engineering

• Object-Oriented Software Development

• Software Process

• Software Life-Cycle Models

• Object Orientation

• Software Quality Assessment

Scope of Software Engineering

• Software engineering is a discipline whose aim is the production of fault-free software, that is delivered on time, within budget, and satisfies the user’s needs.

Scope of Software Engineering

• Economic Aspects – Software Engineering v.s. Computer Science

• The computer scientist investigates several ways to produce software, some good and some bad.

• But the software engineer is interested in only those techniques that make sound economic sense. For example: A coding technique that can execute very efficiently but with higher maintenance cost may not be a good choice.

Scope of Software Engineering

• Maintenance Aspects – Software Life Cycle / Software Process

• Requirements Phase • Specification (Analysis) Phase • Planning Phase • Design Phase • Implementation Phase • Integration Phase

• Maintenance Phase (highest cost among all these phases) – Corrective, Perfective, and Adaptive Maintenance

• Retirement

Scope of Software Engineering

Requirement 2%

Specification 4%

Planning 1%

Design 6%

Module Coding 5%

Module Testing 7%

Integration 8%

Maintenance 76%Maintenance

67%

Approximate relative costs of the phases of the software life cycle.

Maintenance is so important, a major aspect of software engineering consists of techniques, tools, and practices that lead to a reduction in maintenance cost.

Scope of Software Engineering

• Specification and Design Aspects – Software professionals are humans, and humans

can make error.

– The fact that so many faults are introduced early in the software life cycle, highlights another important aspects of software engineering, namely, techniques that yield better specifications and designs.

• For example, reducing specification and design faults by 10% will reduce the overall number of faults by 6-7%.

Scope of Software Engineering

• Team Programming Aspects – Most software being developed and maintained

by a team of software engineers

– Scope of software engineering must also include techniques for ensuring that teams are properly organized and managed. • For example, team programming leads to interface

problems among code components and communication problems among team members.

Scope of Software Engineering

• Several techniques have been suggested to help solve the software crisis. – ~1975-1985 : Structured Paradigm

• Structured Systems Analysis, Composite/Structured Design, Structured Programming, Structured Testing

• Lead to major improvements for software industry. • But only good for small programs (say, 5,000-50,000 lines of codes) • Not scale well with today larger programs (say, 500.000-5,000,000 LOC) • Not so good in software maintenance aspects, (for instance, because of the

separation of action-oriented and data-oriented in structured paradigm).

– Object-Oriented Paradigm • An object is a unified software component that incorporates both data and

actions that operate of those data.

Scope of Software Engineering

Structured Paradigm • Requirement Phase

• Specification (Analysis) Phase

• Planning Phase

• Design Phase

• Implementation Phase

• Integration Phase

• Maintenance Phase

• Retirement

Object-Oriented Paradigm • Requirement Phase

• Object-Oriented Analysis Phase

• Planning Phase

• Object-Oriented Design Phase

• Object-Oriented Programming Phase

• Integration Phase

• Maintenance Phase

• Retirement Comparison of life cycles of structures paradigm and object-oriented paradigm.

Object-Oriented Software Development

• Three key words. – Software

– Development

– Object Orientation

• Let us look at each in turn

Software

• Programs

• Documentation during the development of programs (e.g. specification)

• Primary aids for running the programs (e.g. user manuals)

• Secondary aids for running the programs (e.g. key boards overlays)

Software is not just programs!

Software Life Cycle

• Software is like humans.

• It has a life cycle.

• Software in a system is conceptualized first.

• It becomes obsolescent at the end.

• The period in between is called the software life cycle.

Software Life Cycle Models

• Build-and-Fix Model • Waterfall Model • Rapid prototyping model • Incremental Model • Spiral Model • Concurrent Development Model • Formal Methods Model

For the first four items, please refer to Chapter 3 of “Software Engineering with JAVA”, S.R. Schach, McGraw-Hill, 1997.

Built-and-Fix Model

• Unfortunately, many s/w products are developed with built-and-fix model.

• Without specification or any attempt in design, just build a product, and reworked as many times needed to satisfy the customer.

• Unsatisfactory for any size of s/w development, we better specify the various phases of software process.

Why use a life cycle model?

• Life cycle model breaks down the development process into phases or stages.

• This is because software development is complex.

• Breaking down the development process makes it easier to manage.

• Each phase can be performed in various ways.

Waterfall Model

Requirement Verify

Implementation Testing

Planning Verify

Retirement

Design Verify

Integration Testing

Operation Mode

Specification Verify

Development

Maintenance

Changed Requirements verify

Rapid Prototyping Model

• A rapid prototype is a working model that is functionally equivalent to a subset of the product (internal structure is not concerned yet).

• The sole use of rapid prototyping is to determine what the client’s real needs are, construct the rapid prototype as rapidly as possible to speed up the s/w development process.

Rapid Prototyping Model

Rapid Prototype Verify

Implementation Testing

Planning Verify

Retirement

Design Verify

Integration Testing

Operation Mode

Specification Verify

Development

Maintenance

Changed Requirements verify

Incremental Model

•The s/w product is designed, implemented, integrated, and tested as a series of

incremental builds, where a build consists of

code pieces from various modules interacting to provide a specific functional capability.

•It is sometimes necessary to re-specify, re-design, re-code, or at worst, throw away what

has already been completed and start again.

Incremental Model

Requirement Verify

Planning Verify

Retirement

Architectural Design Verify

Operation Mode

Specification Verify

Development

Maintenance

For each build: Perform detailed design, implementation, and integration. Test. Deliver to client.

Spiral Model

• The idea of minimizing risk via the use of prototypes and other means is the concept underlying the spiral model.

• A simplified spiral model is as a waterfall model with each phase preceded by risk analysis. – Before commencing each phase, an attempt is

made to control (resolve) the risks. If it is impossible to resolve all the significant risks at a stage, then the project is immediately terminated.

Full Spiral Model [Boehm, IEEE 1998]

Review Commitment

Partition

Determine objectives, alternatives, constraints

Progress through steps

Cumulative cost

Plan next phase

Develop, verify next-level product

Evaluate alternatives, identify, resolve risks

Risk Analysis

Concept of Operation

Requirement plan life-cycle plan

Prototype 1 Prototype 2 Prototype 3 Operational Prototype

Risk Analysis

Risk Analysis

Risk Analysis

Simulations, models, benchmarks

Software Requirements

Software Product Design

Detailed Design

Development Plan

Integration and Test Plan

Implementation Acceptance Test

Integration Test

Unit Test

Code Requirement Validation

Design validation and verification

Software Development

• Software is developed using a life cycle model.

• Just a life cycle model is insufficient for development.

• We need: – A broad philosophy

– A set of tools which support the philosophy.

– A language which supports the philosophy.

Software Development Paradigm

• A paradigm provides a general approach to work during each phase of the life cycle model.

• A paradigm is a broad philosophy.

• A paradigm is not a specific model.

Some Software Development Paradigms

• Functional Composition

• Logic Programming

• Structured Development

• Object Orientation

Functional Development

• A problem is expressed in termed of a set of mathematical functions. – e.g. Double(x) = Add(x, x).

• An algorithm is not specified.

• Language such as Miranda, Gofer, Haskell support this paradigm.

• Poor execution speed.

Logic Programming

• Consists of a problem description only. – e.g. Factorial(0) = 1.

Factorial(N) = N x Factorial(N -1).

• Doesn’t describe how to solve the problem.

• Languages Prolog & Lisp support this paradigm.

Structured Development

• Also called SASD, SADT & Functional Decomposition.

• Breaks the system into processes & decomposes them.

• Languages C, Fortran, Pascal, Cobol, Basic and a lot more support this paradigm.

• By far the most popular paradigm.

Object Orientation

• Most recent paradigm.

• Treats a problem as a collection of objects.

• Becoming very popular now.

• More and more languages support this paradigm now.

Tools for OO

• Rambaugh (OMT)

• Coad-Yourdon

• Booch

• UML

Languages for OO

• C++

• Smalltalk

• Eiffel

• Object C

• Object Pascal

• Java

Software Quality Assessment

• CMM by SEI

• ISO 9000