software engineering lecturer: yu jun school of computer science and engineering, xi’an...

31
Software Engineer ing Lecturer Lecturer : : YU Jun YU Jun School of Computer Science and Engineering, Xi’an Technological University

Upload: jade-horton

Post on 29-Dec-2015

228 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Software Engineering Lecturer: YU Jun School of Computer Science and Engineering, Xi’an Technological University

Software Engineering

LecturerLecturer: : YU JunYU Jun

School of Computer Science and Engineering, Xi’an Technological University

Page 2: Software Engineering Lecturer: YU Jun School of Computer Science and Engineering, Xi’an Technological University

Course Overview

• What is software engineering? • Modeling the process and life cycle • Planning and managing the project • Capturing the requirements • Designing the system • Concerning objects • Writing the programs • Testing the software • Maintaining the system

Page 3: Software Engineering Lecturer: YU Jun School of Computer Science and Engineering, Xi’an Technological University

教材( TextBook )

Software Engineering: Theory and Practice (Second Edition) .

Shari Lawrence Pfleeger.

Prentice-Hall, Inc. 2001

Page 4: Software Engineering Lecturer: YU Jun School of Computer Science and Engineering, Xi’an Technological University

Fundamentals of Software Engineering (2nd Edition)

Carlo Ghezzi, Mehdi Jazayeri, Dino Mandrioli

Prentice-Hall, Inc. (2002)

Software Engineering: A Practitioner’s Approach ( Sixth Edition ) 

Roger S. Pressman,

Mc Graw Hill (2006)    

参考书目 (References)

Page 5: Software Engineering Lecturer: YU Jun School of Computer Science and Engineering, Xi’an Technological University

参考书目 (References)

软件工程导论软件工程导论(第(第 44 版) 版) 张海藩 , 清华大学出版社( 200

3 )

Page 6: Software Engineering Lecturer: YU Jun School of Computer Science and Engineering, Xi’an Technological University

其它参考资料

系统 /软件工程研究与实践论坛 http://www.sweforum.net

UML 软件工程组织 http://www.uml.org.cn/

IT 之源 http://www.iturls.com/

UML 之源 http://www.umlchina.com

软件工程协会 http://www.sei.cmu.edu/

科学文献索引 http://citeseer.nj.nec.com/

Page 7: Software Engineering Lecturer: YU Jun School of Computer Science and Engineering, Xi’an Technological University

Chapter 1: What is software engineering?

The Evolving Role of Software

In the early days: User Computer Software = “Place a sequence of instructions together to get the computer to do something useful”.

In late 1950’s: Computer became cheaper and more common High level languages were invented

ProgrammerUser Computer

In early 1960’s: Very few large software projects were done by some experts.

Page 8: Software Engineering Lecturer: YU Jun School of Computer Science and Engineering, Xi’an Technological University

In middle to late 1960’s:

Truly large software systems were attempted.

Case 1. 美国 IBM 公司在 1963 年至 1966 年开发的 IBM360 机的操作系统。这一项目花了 5000 人一年的工作量,最多时有 1000 人投入开发工作,写出了近 100 万行源程序。据统计,这个操作系统每次发行的新版本都是从前一版本中找出 1000 个程序错误而修正的结果。 这个项目的负责人 F. D. Brooks 事后总结了他在组织开发过程中的沉痛教训时说:“…正像一只逃亡的野兽落到泥潭中做垂死的挣扎,越是挣扎,陷得越深,最后无法逃脱灭顶的灾难。…程序设计工作正像这样一个泥潭,…一批批程序员被迫在泥潭中拼命挣扎,…谁也没有料到问题竟会陷入这样的困境…”。 IBM360 操作系统的历史教训成为软件开发项目的典型事例为人们所记取。

Software Crisis !

-- NATO Conference, Garmisch, Germany, 1968

Or maybe Chronic Affliction is more

accurate?

Page 9: Software Engineering Lecturer: YU Jun School of Computer Science and Engineering, Xi’an Technological University

What is Software ?

Software is a set of items or objects that form a configuration that includes

instructions (computer programs) that when executed provide desired function and performance,

data structures that enable the programs to adequately manipulate information, and

documents that describe the operation and use of the programs.

AND MORE …( Characteristics of software) Software is developed or engineered, it is not manufactured in the classical sense.

High quality is achieved through good design

Depend on people

Require the construction of a “product”

Page 10: Software Engineering Lecturer: YU Jun School of Computer Science and Engineering, Xi’an Technological University

PART ONE

Software doesn’t wear out.

Failurerate

Time

Infant mortality Wear

out

Failure curve for hardware

idealized curve

change

increased failurerate due to side effects

actual curve

But it does deteriorate!

There are no software spare parts

Although the industry is moving toward component-based assembly, most software continues to be custom built.

Page 11: Software Engineering Lecturer: YU Jun School of Computer Science and Engineering, Xi’an Technological University

Dramatic improvements in hardware performance

Profound changes in computing architectures

Vast increases in memory and storage capacity

Wide variety of exotic input and output options

More sophisticated and complex computer-based systems

Today(Evolving role of software)

Software =Product (information transformer)

Vehicle for delivering a product (OS, network, tools)

The same questions are still asked today:

Why does it takes so long to get software finished?

Why are development costs so high?

Why can’t we find all the errors before we give the software to customers?

Why do we continue to have difficulty in measuring progress as software is being developed?

Page 12: Software Engineering Lecturer: YU Jun School of Computer Science and Engineering, Xi’an Technological University

Case 2. In the late 1960s, a bright-eyed young engineer* was chosen to “write” a computer program for an automated manufacturing application. The reason for his selection was simple. He was the only person in his technical group who had attended a computer programming seminar. He knew the in’s and out’s of assembler language and Fortran, but nothing about software engineering and even less about project scheduling and tracking. His boss gave him the appropriate manuals and a verbal description of what had to be done. He was informed that the project must be completed in two months. He read the manuals, considered his approach, and began writing code. After two weeks, the boss called him into his office and asked how things were going. “Really great,” said the young engineer with youthful enthusiasm, “This was much simpler than I thought. I’m probably close to 75 percent finished.” The boss smiled. “That’s really terrific,” he said. He then told the young engineer to keep up the good work and plan to meet again in a week’s time.

*If you’re wondering whether this story is autobiographical, it is!

Page 13: Software Engineering Lecturer: YU Jun School of Computer Science and Engineering, Xi’an Technological University

A week later the boss called the engineer into his office and asked, “Where are we?” “Everything’s going well,” said the youngster, “but I’ve run into a few small snags. I’ll get them ironed out and be back on track soon.” “How does the deadline look?” the boss asked. “No problem,” said the engineer. “I’m close to 90 percent complete.” If you’ve been working in the software world for more than a few years, you can finish the story. It’ll come as no surprise that the young engineer stayed 90 percent complete for the entire project duration and only finished (with the help of others) one month late.

Myth: The only deliverable for a successful project is the working program.

Reality: A working program is only one part of a software configuration that includes programs, documents, and data. Documentation forms the foundation for successful development and, more important, provides guidance for software support.

Managers —— evaluate, track progress, ......

Programmers —— communicate to each other

Maintainers —— VITAL!

Page 14: Software Engineering Lecturer: YU Jun School of Computer Science and Engineering, Xi’an Technological University

1.1 What is Software Engineering?

Solving Problems

Problem

Analyzing

Attention: the small ones’ relationships

Synthesis

Page 15: Software Engineering Lecturer: YU Jun School of Computer Science and Engineering, Xi’an Technological University

Any problem_solving technique must have two parts:

Analyzing the problem to determine its nature;

Synthesis the solution based on the analysis.

To help us solve a problem,we use a variety of methods, tools, procedures, and paradigms.

A method or technique is a formal procedure for producing some result.

A tool is an instrument or automated system for accomplishing something in a better way.

A procedure is a combination of tools and technique that,in concert,produce a particular product.

A paradigm represents a particular approach or philosophy for building software.

Page 16: Software Engineering Lecturer: YU Jun School of Computer Science and Engineering, Xi’an Technological University

Where does the software engineer fit in?

Computer Science Customer

theories Computer functions

problem

Software engineering

Tools and techniques to solve problems

Page 17: Software Engineering Lecturer: YU Jun School of Computer Science and Engineering, Xi’an Technological University

1.2 How Successful Have We Been?

Software engineering is about designing and developing high_quality software.

But software is not without its problems.

Sidebar 1.1 Terminology for describing bugs

BUG: is a mistake in interpreting a requirement,a syntax error in a piece of code,or the (as-yet-unknown) cause of a system crash.

FAULT:occurs when a human makes a mistake,called an error,in performing some software activity.A single error can generate many faults,and a fault can reside in any development or maintenance product.

FAILURE:is a departure from the system’s required behavior.It can be discovered before or after system delivery,during testing,or during operation and maintenance.

Page 18: Software Engineering Lecturer: YU Jun School of Computer Science and Engineering, Xi’an Technological University

1.3 What Is Good Software

What we mean by high-quality?

Sidebar 1.2 Perspective on Quality

Garvin describes quality from five different perspective:

The transcendental view,where quality is something we can recognize but not define

The user view,where quality is fitness for purpose

The manufacturing view,where quality is conformance to specification

The product view,where quality is tied to inherent product characteristics

The value-based view,where quality depends on the amount the customer is willing to pay for it

Page 19: Software Engineering Lecturer: YU Jun School of Computer Science and Engineering, Xi’an Technological University

For a software product,we must consider its quality in three aspects:

The quality of the product

The quality of the process

The quality in the context of the business environment

Page 20: Software Engineering Lecturer: YU Jun School of Computer Science and Engineering, Xi’an Technological University

1.4 Who Does Software Engineering?

Builds system

customer Sponsors system development

Users system

userdeveloper

$$ needsContractual obligation

needs

Software system

Page 21: Software Engineering Lecturer: YU Jun School of Computer Science and Engineering, Xi’an Technological University

1.5 A System Approach

A system is a collection of objects and activities,plus a description of the relationships that tie the objects and activities together

The Elements of a System---- Activities and Objects

an activity is something that happens in a system

an object or entity is the element that is involved in the activity

First name Postal code

Middle name Salary per hour

Last name Benefits per hour

Street address Vacation hour accrued

City Sick leave accrued

State

Page 22: Software Engineering Lecturer: YU Jun School of Computer Science and Engineering, Xi’an Technological University

Relationships and the System Boundary

we can think of the system at which we are looking as having a border or boundary. Some item cross the boundary to enter our system, and others are products of our system and travel out for another system’s use.

A system is a collection of things: a set of entities, a set of activities, a description of the relationships among entities and activities, and a definition of the boundary of the system

computer

Date validation calculation printing

mail

Pay information

Pay checks

System boundary

Page 23: Software Engineering Lecturer: YU Jun School of Computer Science and Engineering, Xi’an Technological University

Interrelated Systems

Because very few system are independent of other systems, the concept of boundary is important, and we should know what is within and without the system and what crosses the boundary.

In addition, it is possible for one system to exist inside another system. If so, we can concentrated on a small piece of what is really a much larger system

Reporting system for data

Data management system for collected data

Communication system from remote sites to central

Calculation system for remote data

Remote data collection system

Page 24: Software Engineering Lecturer: YU Jun School of Computer Science and Engineering, Xi’an Technological University

1.6 An Engineering Approach

Building a house

Determining and analyzing the requirements

Producing and documenting the overall design of the house

Producing detailed specification of the house

Identifying and designing the components

Building each component of the house

Testing each component of the house

Integrating the components making final modifications after the residents have moved in

Continuing maintenance by the residents of the house

Page 25: Software Engineering Lecturer: YU Jun School of Computer Science and Engineering, Xi’an Technological University

Building a system

Requirements analysis and definition

System design

Program design

Writing the program

Unit testing

Integration testing

System testing

System delivery

maintenance

Page 26: Software Engineering Lecturer: YU Jun School of Computer Science and Engineering, Xi’an Technological University

1.7 Members of the development team

Requirements analysis and definition

ANALYST

DESIGNER

System design

PROGRAMMER

Program design

Program implementation

Unit testing

Integration testing

System testing

TESTER

System delivery and maintenanceTRAINER

Page 27: Software Engineering Lecturer: YU Jun School of Computer Science and Engineering, Xi’an Technological University

1.9 Information Systems Example

Piccadilly Television Airtime Sales

Advertising agencies

Audience measurement

bureaus

Program suppliers

Broadcasting board

Piccadilly management

Production companies

Copy transmission instructions Campaign

requirements

Selected spots

Spot upgrade request

Agency invoice

Agreed campaign

Ratecard

Suggested campaign

Preemption warning

Upgrade confirmation

Television ratings report

New programProgram

purchase agreement

Programming rules

Program transmission

schedule

Revenue report

Sales target

instruction

Commercial copy

recording

Program transmission

schedule

Page 28: Software Engineering Lecturer: YU Jun School of Computer Science and Engineering, Xi’an Technological University

学期项目 :Loan Arranger

计划:全部同学共分为 10 组,每组 8 人,每一个小组推选一位负责人,作为项目经理。项目经理有权利对小组其它的人员进行具体的角色分工和人事调整。每组人员的角色可为: 1. 项目经理 2. 系统分析人员 3. 系统设计人员 4. 系统实施人员 5. 系统测试人员

Page 29: Software Engineering Lecturer: YU Jun School of Computer Science and Engineering, Xi’an Technological University

要求: 项目经理负责:组织、分工、控制进度 ; 对每次组员成绩有 5

分浮动调整权; 项目经理奖罚:引起过半数组员不满,则改选;

带领全组顺利完成任

务,总评 +10 。小组成员:在项目经理的统一协调下完成项目,

根据完成的质量来决定最后的成绩。

Page 30: Software Engineering Lecturer: YU Jun School of Computer Science and Engineering, Xi’an Technological University

内 容1. 需求规格说明书(书面)2. 总体设计报告 (演讲)3. 推出 v1.0 (现场验收)4. 推出升级版(现场验收)5. 面向对象分析练习题一道(演讲)6.推出期末最终版并制作案例总结报告(现场验

收和演讲)

Page 31: Software Engineering Lecturer: YU Jun School of Computer Science and Engineering, Xi’an Technological University

目 的 体验软件工程各阶段的主要工作,特别注意吸取教训;

学会与他人合作,培养团队精神,单干户将得不到成绩。

从现在开始,谁也不知道我们的项目会不会成功,但是请牢记:目标、交流与合作、内省