1 / 81

Instructor: Mao Ying-Chi ( 毛莺池 ) Email: julie@dislab.nju mao_yingchi@yahoo

Software Engineering. Instructor: Mao Ying-Chi ( 毛莺池 ) Email: julie@dislab.nju.edu.cn mao_yingchi@yahoo.com Tel: 25-83787541. Syllabus. The basic concepts of SE The software development process Software requirements and specifications Software design techniques

shanna
Download Presentation

Instructor: Mao Ying-Chi ( 毛莺池 ) Email: julie@dislab.nju mao_yingchi@yahoo

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Software Engineering Instructor: Mao Ying-Chi (毛莺池) Email: julie@dislab.nju.edu.cn mao_yingchi@yahoo.com Tel: 25-83787541

  2. Syllabus • The basic concepts of SE • The software development process • Software requirements and specifications • Software design techniques • Software testing, documentation and maintenance • Software measurement • Software quality management • CASE tools …

  3. Course Objectives • Goal 1 • To help students to develop skills that will enable them to construct software of high quality – software that is reliable, and that is reasonably easy to understand, modify and maintain • Goal 2 • To foster an understanding of why these skills are important

  4. Teaching Methods • Lectures (2 per week) • … are compulsory • … cover core material • Practicals (1 per week) • … last for 3 hours • … are compulsory • … are used for the team project • … are used to the term assessments • Team meetings (at least 1 per week) • You will need to meet with your team regularly • Labs • There are no regularly scheduled lab sessions

  5. Lectures Timetable • Location Time Northern building (北教) Room 203 Monday 3 - 4 Room 303 Wednesday 5 – 6 (week 1 to 14)

  6. Assessments • Team projects • Team project is worth 40%. • Presentation is worth 20% of your grade. • All presentations are team presentations. • Presentations include feasible analysis report, design report, a demo of your project and summary. • The term paper is worth 20%. • Final Exam • The end of term exam counts for 60% of the course grade and there is no mid-term exam.

  7. Books • Course Text (Required) • 杨文龙,姚淑珍,吴芸编著,软件工程,电子工业出版社 • Other Texts (Recommended) • Roger S. Pressman, “Software Engineering: A Practitioner Approach (Fifth Edition)”. McGraw Hill Education • Han van Vliet, “Software Engineering: Principles and Practice (Second Edition)”. Wiley • Ian Sommerville, “Software Engineering (6th Edition)”. McGraw Hill Education • 可视化面向对象建模技术,刘超、张莉编著,北京航空航天大学出版社 • Background Reading • I will suggest some other readings during the course.

  8. Contents • Part I • The traditional Software Engineering • Part II • Object Oriented Software Engineering (UML) • Part III • Software Process, Management and Quality

  9. Team Projects • 以“学生选课系统”为例 • 采用面向对象软件工程的方法进行分析、设计、开发、测试及维护。

  10. 项目分组 • 全班分为3组,每组10人 • 各组角色及其职责 • 项目经理(1) • 系统分析员(2) • 软件开发工程师(4) • 测试工程师(1/2) • 流程及配置工程师(2)

  11. 时间安排

  12. 课程设计需要完成的文档 • 可行性研究报告 • 项目开发计划 • 需求规格说明书 • 总体设计说明书 • 详细设计说明书 • 测试计划 • 测试分析报告 • 项目开发总结报告 • 用户手册 • 开发进度周报

  13. 实验目的 • 体验软件工程各阶段的主要工作,特别注意吸取教训; • 学会与他人合作,培养团队精神。 现在开始 行 动 起 来!

  14. Orientation Any Questions??

  15. 第1讲 软件危机与软件工程

  16. 从千年虫问题谈起 • 千年虫如同一个定时炸弹一样,十几年前就有人提出了预警,但是无人注意 • 直到日期到来的前两年,才引起了恐慌

  17. .COM浪潮 • Wall Street investors gave tiny “dot-com” companies billion dollar valuations before these start-ups produced a dollar in sales. • .COM纷纷倒下 • US government began to indict the biggest software company – Microsoft.

  18. “Computer software has become a driving force. It is the engine that drives business decision making. It servers as the basis for modern scientific investigation and engineering problem solving. It is a key factor that differentiates modern products and services. It is embedded in systems of all kinds: transportation, medical, telecommunications, military, industrial processes, entertainment, office products,… the list is almost endless. Software is virtually inescapable in a modern world. And as we move into the 21st century, it will become the driver for new advances in everything from elementary education to genetic engineering.”

  19. 什么是软件 • 软件是计算机系统中与硬件相互依存的另一部分,它是包括程序,数据及其相关文档的完整集合。 • 程序是按事先设计的功能和性能要求执行的指令序列(instructions) • 数据是使程序能正常操纵信息的数据结构(data structures) • 文档是与程序开发,维护和使用有关的图文材料(documents)

  20. 什么是软件(续) • And more • Software is developed or engineered, it is not manufactured in the classical sense. • High quality is achieved through good design • Depend on people • Require theconstructionof a “product”

  21. 软件的特点 • 表现形式 • 软件是一种逻辑实体,而不是具体的物理实体。因而它具有抽象性 • 生产方式 • 软件的生产与硬件不同,在它的开发过程中没有明显的制造过程,大多数软件仍是定制的。 • 维护 • 在软件的运行和使用期间,没有硬件那样的机械磨损,老化问题 • 要求 ? • 软件产品不允许误差

  22. increased failure rate due to side effects Failure Infant mortality Wear out rate Failure curve for hardware change actual curve idealized curve Time  Software doesn’t wear out. 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.

  23. 软件的特点 • 软件的开发和运行常受到计算机系统的限制,对计算机系统有着不同程度的依赖性 • 软件的开发至今尚未完全摆脱手工艺的开发方式 • 软件本身是复杂的 • 实际问题的复杂性 • 程序逻辑结构的复杂性 • 软件成本相当昂贵 • 相当多的软件工作涉及到社会因素

  24. 软件质量要素 • 可维护性:软件必须能够不断进化以满足用户的需求变 化,这是软件产品最根本的要素,因为工作环境是不断变化的,软件也必然要跟着变化。 • 可依赖性:包括可靠性、保密性和安全性。可靠的软件在系统失败的情况下,也不会导致人员伤亡和经济损失。 • 有效性:软件不要浪费内存和CPU等系统资源,因而有效性应包括响应时间、处理时间、内存利用率等。 • 可用性:软件必须具备可用性。必须是用户不用特殊地努力就能操作。那么,软件必须提供用户界面和充分地说明文档。

  25. 软件的分类 • 按软件的功能进行划分: • 系统软件 使计算机系统各个部件、相关软件和数据协调、高效地工作的软件 • 操作系统 • 数据库管理系统 • 设备驱动程序 • 通信处理程序等

  26. 软件的分类 • 支撑软件 协助用户开发软件的工具软件 • 文本编辑程序 • 文件格式化程序 • 磁盘向磁带进行数据传输的程序 • 程序库系统 • 支持需求分析、设计、实现、测试和支持管理的软件

  27. 软件的分类 • 应用软件 • 商业数据处理软件 • 工程与科学计算软件 • 计算机辅助设计/制造软件(CAD/CAM) • 系统仿真软件 • 智能产品嵌入式软件 • 实时软件 • 事务管理、办公自动化软件 • 计算机辅助教学软件

  28. 软件的分类 • 按软件规模进行划分: • 类别 参加人员数 研制期限 源程序行数 • 微型 1 1~4周 0.5k • 小型1 1~6月 1k~2k 数值计算或数据处理,通常没有与其它程序的接口。需要按一定的标准化技术、正规的资料书写以及定期的系统审查。只是没有大题目那样严格。 • 中型2~5 1~2年 5k~50k 软件人员之间、与用户之间的联系、协调的配合关系。因而计划、资料书写以及技术审查需要比较严格地进行。应用程序和系统程序。系统的软件工程方法是完全必要的。

  29. 软件的分类 • 大型5~20 2~3年 50k~100k • 编译程序、小型分时系统、实时控制系统等。二级管理,若干小组,每组5人以下。人员调整往往不可避免,新手的培训。采用统一的标准,实行严格的审查是绝对必要的。 • 甚大型100~1000 4~5年 1M(=1000k) • 若干个子项目,每一个子项目都是一个大型软件。子项目之间具有复杂的接口。如远程通信系统、多任务系统、大型操作系统、大型数据库管理系统、军事指挥系统通常现有这样的规模。很显然,这类问题没有软件工程方法的支持,它的开发工作是不可想象的。 • 极大型2000~5000 5~10年 1M~10M • 军事指挥、弹道导弹防御系统。 • 只是对软件工程技术依赖的程度不同而已。

  30. 软件的分类 • 按软件工作方式划分: • 实时处理软件 • 分时软件 • 交互式软件 • 批处理软件

  31. 软件的分类 • 按软件服务对象的范围划分: • 项目软件 • 产品软件

  32. 软件的分类 • 按使用的频度进行划分: • 一次使用 • 频繁使用

  33. 软件的分类 • 按软件失效的影响进行划分: • 高可靠性软件 • 一般可靠性软件

  34. easier 软件的发展 In the early days: “Software” = “Place a sequence of instructions together to get the computer to do something useful”. User  Computer Late 1950’s: Computer became cheaper and more common High level languages were invented  User  Programmer Computer

  35. 软件的发展 In early 1960’s: Very few large software projects were done by some experts. HackerCracker In middle to late 1960’s: Truly large software systems were attempted.

  36. 软件的发展 • 70年代和80年代 • “新的工业革命” • “工业社会将转变为信息社会” • …… • 90年代 • “知识的民主化将改变旧的权力结构” • 21世纪初 • “Y2K定时炸弹” • “无所不在的计算”(Ubiquitous Computing)

  37. More sophisticated and complex computer-based systems 软件的发展 Today: 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 Product (information transformer) Software= Vehicle for delivering a product (OS, network, tools)

  38. 软件的发展 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?

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

  40. 软件危机 问题出在哪里? ⑴ 项目没有被很好地理解;计划不周,最终导致进度拖延。 Case2: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.

  41. 软件危机 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.

  42. 软件危机 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.

  43. 软件危机 Case3: In the early 1980s, the United States’ Internal Revenue Service (IRS)国内税收 hired Sperry Corporation to build an automated federal income tax form processing system. According to the Washington Post, the “system has proved inadequate to the workload, cost nearly twice what was expected and must be replaced soon” (Sawyer 1985). In 1985, an extra $90 million was needed to enhance the original $103 million worth of Sperry equipment. In addition, because the problem prevented the IRS from returning refunds退款 to taxpayers by the deadline, the IRS was forced to pay $40.2 million in interest and $22.3 million in overtime wages for its employees who were trying to catch up.

  44. 软件危机 In 1996, the situation had not improved. The Los Angeles Times reported on March 29 that there was still no master plan for the modernization of IRS computers, only a six-thousand-page technical document. Congressman Jim Lightfoot called the project “a $4-billion fiasco惨败 that is floundering(挣扎) because of inadequate planning” (Vartabedian 1996). Myth: If we get behind schedule, we can add more programmers and catch up. Reality: Software development is not a mechanistic process like manufacturing. In the words of Brooks, “adding people to a late software project makes it later.”

  45. 软件危机 ⑵ 没有充分的文档资料(documentation) 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 the software maintenance task. Managers —— evaluate, track progress, ...... Programmers —— communicate to each other Maintainers —— Vital 人与人的交流比写程序困难得多。

  46. 软件危机 ⑶ 软件可靠性(reliability)缺少度量的标准,质量无法保证。如何保证软件产品的质量,是非常复杂困难的问题,特别对于规模庞大的软件。 The software supporting the American space shuttle consists of 3 million lines of code, including computers on the ground controlling the launch and the flight; there were one hundred thousand lines of code in the shuttle itself in 1985. President Reagan’s proposed Strategic Defense Initiative (SDI) is estimated to require 10 to 100 million lines of code. Many computer scientists and software engineers continue to believe there is no way to write and test the software to guarantee adequate reliability.

  47. 软件危机 ⑷ 软件难以维护(maintainability) 不易升级(evolvability) Myth:Once we write the program and get it to work, our job is done. Reality:Someone once said that “the sooner you begin ‘writing code’, the longer it’ll take you to get done.” Industry data indicate that between60 and 80 percentof all effort expended on a program will be expendedafter it is delivered to the customer for the first time.

  48. 软件工程 Better management  Different team organizations  Better languages & tools • Uniform coding conventions 必须意识到:“软件”编程,它有自己的生命周期(life cycle)。大型软件系统的开发与其它工程项目如建造桥梁、制造飞机、轮船等的开发是同理的。 解决问题的想法: “软件工程”(Software Engineering) NATO Conference , Garmisch , Germany , 1968.

  49. 软件工程定义 • Boehm:运用现代科学技术知识来设计并构造计算机程序及为开发、运行和维护这些程序所必需的相关文件资料。 • IEEE:将系统化的、规范的、可度量的方法应用于软件的开发、运行和维护的过程,即将工程化应用于软件中。 • Fritz Bauer:建立并使用完善的工程化原则,以较经济的手段获得能在实际机器上有效运行的可靠软件的一系列方法。

More Related