登陆注册
23770800000033

第33章 Software Engineering(3)

A fundamental concept in software engineering is the software life cycle. Software, like many other products, goes through a cycle of repeating phases (Figure 5-1).

Software is first developed by a group of developers/programmers. Usually, it is in use for a while before modifications are necessary. Modification is often needed due to errors found in the software, changes in the roles or laws, or changes in the company itself. The software should be modified before further use. These two steps use and modify, continue until the software becomes obsolete. By "obsolete," we mean the software loses its validity because of inefficiency, obsolescence of the language, major changes in the company, or other factors. Some examples of software developments that normally go through this cycle are student registration systems, billing systems, and accounting systems.

The development process in the software life cycle involves four phases:analysis, design, implementation, and testing. Figure 5-2 shows these phases as part of the development process.

The development process starts with the analysis phase, which shows what the package should do. In this phase, the systems analyst defines requirements that specify what the proposed system is to accomplish. The requirements are usually stated in terms that the user understands. There are four steps in the analysis phase:define the user, define the needs, define the requirements, and define the methods.

A software package may be designed for a generic user or a specific user. For example, an accounting package may be created for use by any firm. On the other hand, a customized banking package may be created for a specific bank. The user of the package must be clearly defined.

After the user has been identified, the analysts clearly define the needs. In this step, the best answer comes from the user. The user, or the representative of the user, clearly defines his/her expectations of the package.

Based on the needs of the user, the analyst can exactly define the requirements for the system. For example, if a package is to print checks at the end of the month for each employee, what level of security and accuracy should be implemented?

Finally, after the requirements are defined in clear terms, the analyst can choose the appropriate methods to meet those requirements.

The design phase defines how the system will accomplish what was defined in the analysis phase. In the design phase, the systems are determined, and the design of the files and the databases is completed.

There are two types of testing: black box and white box. Black box testing is done by the system test engineer and the user. White box testing is the responsibility of the programmer.

Black box testing gets its name from the concept of testing a program without knowing what is inside it and without knowing how it works. In other words, the program is like a black box that you can't see into.

Simply stated, black box test plans are developed by looking only at the requirements statement. This is why it is so important to have a good set of requirements. The test engineer uses these requirements and his or her knowledge of systems development and the user working environment to cream a test plan. This plan will then be used when the system is tested as a whole. You should ask to see these test plans before you write your program.

Whereas black box testing assumes that nothing is known about the program, white box testing assumes that you know everything about the program. In this case, the program is like a glass house in which everything is visible.

White box testing is the responsibility of the programmer, who knows exactly what is going on inside the program. You must make sure that every instruction and every possible situation have been tested. That is not a ****** task!

Experience will help a programmer design good test data, but one thing that she can do from the start is to get in the habit of writing test plans. She should start her test plan when she is in the design stage. As she builds her structure chart, she should ask herself what situations, especially unusual situations, she needs to test for and make a note of them immediately. She may not remember an hour later.

When she is writing her flowcharts, she should review them with an eye toward test cases and make notes of the cases she needs.

When it comes time to construct her test cases, she should review her notes and organize them into logical sets. Except for very ****** student programs, one set of test data will not completely validate a program. For large-scale development projects: 20, 30, or more test cases may need to be run to validate a program.

Finally, while she is testing, she will think of more test cases. Again, she should write them down and incorporate them into her test plan. After her program is finished and in production, she will need the test plans again when she modifies the program.

【New Words】

life cycle

生命周期

test case

测试用例

validate

确认,证实,验证

algorithmic

算法的

modularity 模块性,模块化

structure chart

结构图

generic

通用的,一般的,类的 package

程序包

validity

有效性

obsolescence

过时,淘汰

5.2 The Methods of Modern Software Design

We shall briefly discuss some topics in modern software designs such as top-down design/programming, bottom-up design/programming, and structured design/programming.

Top-down design is basically a decomposition process, which focuses on the flow of control or on the control structure of the program. The first step is to study the overall aspects of the task at hand and to break it down into a number of modules (perhaps 3 to 10). The second step is to break down each one of these modules further into independent sub modules. The process repeats until you can obtain modules that are small enough to grasp mentally and to code at one sitting in a straightforward, uncomplicated way. A multi-level logic/control structure is thus formed. Clearly, some modules may extend through several levels.

同类推荐
  • 双语学习丛书-年华追忆

    双语学习丛书-年华追忆

    流淌心灵的隽语,记忆的箴言,在双语的世界里,感受英语学习的乐趣,体会英语学习的奥妙,提高英语学习的能力!丛书包括:爱的交融、财富精英、成长课堂、醇香母爱、父爱如山、故乡情怀、节日趣闻、快乐心语、浪漫往昔等故事。
  • 澳大利亚学生文学读本(第2册)

    澳大利亚学生文学读本(第2册)

    从最简单入门的英语句式、拼写与发音开始,并且附有大量插图,通过趣味而有教育意义的故事,引发孩子们学习语言的兴趣;并向规范、美丽的文学作品过渡,让孩子们掌握语言的艺术,感受本国的人文历史。是中国学生学习英语、全面了解西方社会的很好途径。
  • 带本英语书游世界

    带本英语书游世界

    本书章节分为Chapter1万事俱备Chapter2快乐出发Chapter3平安到达Chapter4享受美食Chapter5遨游世界Chapter6疯狂购物每个章节详细描写了相关旅游出行的细节,词汇补给、旅游应急句、实用情景对话帮助读者轻松出行。
  • 《21世纪大学英语》配套教材.阅读.3

    《21世纪大学英语》配套教材.阅读.3

    本系列教材是普通高等教育国家级重点教材《21世纪大学英语》的配套系列教材,包括《阅读》、《口语》和《词汇》三种,每一种分一、二、三册,供大学非英语专业的基础英语课堂教学和练习使用。《阅读》以提高学生的阅读能力为目的。第一册和第二册每册十单元。每一单元介绍一种阅读技能,并带针对性训练。各单元还配有三篇快速阅读,旨在通过反复训练以帮助学生掌握阅读技能,提高阅读速度。第三册以介绍文学名著为主,通过对各种不同文体和风格的文字进行讲解与分析,以增强学生对文学作品的欣赏能力。
  • 双语学习丛书-影视名流

    双语学习丛书-影视名流

    流淌心灵的隽语,记忆的箴言,在双语的世界里,感受英语学习的乐趣,体会英语学习的奥妙,提高英语学习的能力!丛书包括:爱的交融、财富精英、成长课堂、醇香母爱、父爱如山、故乡情怀、节日趣闻、快乐心语、浪漫往昔等故事。
热门推荐
  • 我当为天

    我当为天

    不全的天道,造成了百世衰人的出现。轮回为什么停止?末法为什么成了乱世?天道因何缺失?天道不堪,我当为天。
  • 江郎财进:隔壁有只小竹马

    江郎财进:隔壁有只小竹马

    人家重生她穿越,人家重生有各种金大腿,她穿越只有拖油瓶竹马一只,她其实很想对老天爷说,我不穿行吗?老天爷黑线:憋赖我!我哪儿知道你咋穿滴?吕茆讪笑:不是您老人家给开的金大腿吗?老天爷:……你当金大腿是大白菜呢?吕茆撇嘴:那小竹马能不能换一只?老天爷白眼:爱换不换!某小竹马伸出白嫩嫩的小手,慢吞吞拎起小短裤,高冷一笑:我都被你看光了,你想始乱终弃?!吕茆:……个二货!总之就是一只重生遇上一只穿越之后,各种宠各种撒狗粮的故事
  • 上古世纪:黎明之战

    上古世纪:黎明之战

    一个玩腾讯网游上古世纪的玩家叶缘睡梦中穿越了倒霉蛋叶缘醒来以后发现一切都不一样了!神与英雄的传说,诺亚!精灵?古老的寂静之海,传说中的原大陆!恶魔军团!浴血军团!吉恩的大军!海龙兽堤丰,大海怪克拉肯,海魔多刚,安塔伦,基里奥斯一个个耳熟能详的名字。安德鲁:我的生命短暂而又辉煌
  • 电影世界的旅行札记

    电影世界的旅行札记

    穿行在一个又一个似曾相识的魔幻电影世界当中,就如同是一场看不到尽头的旅途。他不知道自己为何而来,也不知道自己的终点在哪儿,甚至有时候分不清自己到底是谁。唯一可以确定的只有一件事情——他叫吴孟,一个穿梭于电影世界的旅者。
  • 娴梦之缘

    娴梦之缘

    “你是自残吗?是你先过来搭讪的。”“呃,自残是什么意思?”墨雨轩趴在林烁耳边轻轻的说:“你傻呀,自残=自恋+脑残”这点常识都不懂!““你好,我叫尹梦雪。”“你好,我叫江含韵。”“你好,我叫.......”最后一个女生笑嘻嘻地说:“你好,我叫丁梦雨,很高兴认识你!”
  • 天穹守望者

    天穹守望者

    俗世中,一名普通的大学生,遭人陷害被流放莽荒星球,凭借手机中太极影像,一罐蒸馏水,毅然踏上尘封的远古仙路。
  • 回到明朝我做主

    回到明朝我做主

    阴差阳错郭笑天回到了古代明朝正统年间。找个世外桃源,建设自己的大本营!种田,练兵,集团企业化管理!发展硬实力开心了我就平乱,不开心我就造反,你说什么呢?我说:“回到明朝我做主!”
  • 大风起南山

    大风起南山

    一个小狱差,却不经意间踏入了庙堂。庙堂之高,足以决生死。江湖之远,安能平风波。北顾狼烟,烽火起,下山道士,颂苍生。一个步步向上走的殷则,却发现这个世界的诸多不公!当道释儒三家论不出他想要的答案时。当暗处世家要吸掉这人间最后一口血。在这个不革命,毋宁死的变幻莫测的人世间。他,能否寻到那条光明的路,攥紧拳头去打破头顶阴霾,顶着赤色红芒,发出属于他的声音。“王侯将相宁有种乎!”
  • 星陨夜

    星陨夜

    这是一个全新的世界,一道虚无的灵魂,偶然附身在一个身受重伤、已经快要魂归天命的躯体上。从此,他开始踏破脚下的大陆,开始了属于他的征途,创下了属于他的辉煌神话!(等级:锻体境——筑基境——四象境——五方境——天识境——化实境——生息境——死魄境——破空境——元帝境)
  • 猫猫狗狗:暹罗当家太可怕

    猫猫狗狗:暹罗当家太可怕

    “我叫向呐呐,我是这里进来的第一只动物,你必须听从我的安排!”“这里是我的领地,你无权占有,我给你时间走出这里,否则不要怪我。”《猫猫狗狗》为宠物型的小说,主要讲诉一只善妒的猫,在面对家里新来的宠物时,先是万分排斥,在后来的岁月中慢慢磨合,所有的宠物形成一个有力的团体的故事。谁说猫类无情?猫狗为仇,猫鼠不和,尽管偏见太多,时间会消磨一切的偏见。不要等到最重要的东西失去了,再急匆匆地挽留与告别——珍惜爱你的人吧。