登陆注册
3765300000033

第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 simple 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 simple 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.

同类推荐
  • 英文爱藏:打开生命的窗

    英文爱藏:打开生命的窗

    人生于世,不过是匆匆过客。急急流年,滔滔逝水。生命中没有什么恒久不变的风景。我们的理智使我们一次次看透人生,我们的激情又使我们一次次重受蒙蔽。生命原本就是一场得失共存的行走,既然来走了这一遭,那就千山万水,随意行去。透过这一篇篇的哲理故事,打开通向灵魂的窗户,在一花一木中抵达生命的豁然之境。作为双语读物,《打开生命的窗》为中英双语对照版,既是英语学习爱好者、文学爱好者的必备读物,也是忙碌现代人的一片憩息心灵的家园,让读者在欣赏原法原味和凝练生动的英文时,还能多角度、深层次地品读语言特色与艺术之美,再配合文章后附加的多功能、全方位巩固题型,更有助于理解并学习英文。
  • Le Mort d'Arthur

    Le Mort d'Arthur

    本书为公版书,为不受著作权法限制的作家、艺术家及其它人士发布的作品,供广大读者阅读交流。
  • Real Marriage 裸婚

    Real Marriage 裸婚

    我在新浪以“介末开门”之名开博,连载自己的婚姻生活。飙升的点击率膨胀了我的虚荣心,我志得意满地准备出书吹嘘自己的幸福生活。出书的事还未见眉目,我离婚了,以雪崩的速度。我第一次真正领略了生活的荒诞,简直想笑。接下来的两年时间,我写了一出话剧,编了一本杂志,又谈了一次热情的恋爱结了一次婚,出书的事情顺理成章地被耽搁下来。本书是作者介末完全真实的个人经历,但也不是自传,毕竟这只是介末不足十年的个人经历,虽然客观真实,但只截取了与婚姻相关的片段,还不能作为全面了解一个人的标准。给婚姻撒上一把“介末”,让人感受超刺激又泪流满面的生活。不粉饰、不矫情、不夸张,一个睿智的女人带你学会生活、婚姻哲学。
  • 那些美好而忧伤的记忆(每天读一点英文)

    那些美好而忧伤的记忆(每天读一点英文)

    《那些美好而忧伤的记忆》选取亲情、友谊、爱情等主题美文,让你在阅读中,感恩那些你爱的、爱你的人们!《每天读一点英文》是一套与美国人同步阅读的中英双语丛书。该丛书由美国英语教师协会推荐,讲解单词、精华句型、翻译、检验阅读成果,升级英语能力!
热门推荐
  • 理想国与哲人王

    理想国与哲人王

    《理想国与哲人王》是王小波杂文的精编,同时收录了他与爱人李银河恋爱时期的部分情书。作家祝勇先生说:王小波的杂文大多涉及文化状态与知识分子命运,自然少不了尴尬与苦涩,所以读王小波杂文,是不能笑笑就了事的。他的幽默为我们展示了一个神秘幽黑的洞口,是浅尝辄止还是深入其中,就全看我们个人的兴趣了。王小波的幽默,点到为止,却是一枚余味无穷的橄榄,常嚼常新。
  • 最强系统抽奖

    最强系统抽奖

    穿越异界!成为了系统执掌师。有无穷无尽的系统。发布任务:十年内建立一座无上祖朝。这有点难办?没事!怕国家没有高手坐镇?没事!我有天庭和西方极乐世界。手下十万天兵天将!十万佛陀。盘古撑天!三千魔神做大道!跟鸿钧论道,情圣泡妞,黄帝治国!…………统领诸天万界!莫敢不从,战威无可敌。如果世间还有主宰!那便是~我——主宰之王!
  • 绝色冷妃

    绝色冷妃

    “既然你那么讨厌我,那你就废了我吧,既让你眼前清静,也还我随心自由。”看着他,她满心悲伤。“别做梦,朕告诉你,皇宫不是你想来就来,想走就走的地方,我决不成全。”满眼厌恶,他不爱,更不放开。面对他的绝情,她满心伤痛,如果,一切还如初见,该有多好。被他罚跪,她晕倒在雨中,抱着她他静静的坐了一夜,醒来后她却决然离去。既然不爱,她也不要他的施舍。于是,她负气,他赌气,她倔强,他亦决然,像两个孩子般相互折磨着当阴谋的面纱被一层层的揭开,她才知道,原来,不是不爱,只是爱太深。金幔帐内,深情凝望,他柔情呢喃,“颜儿,我再也不会把你弄丢,此生,我只愿携你之手,与你共渡一生。”面若桃花,她细语回应,“逸轩,来生,我还愿与你携手一生。”宠冠后宫,她独享无上宠爱,却不想,迎接她的却是一个又一个更大的阴谋……
  • 追妻无门:女boss不好惹

    追妻无门:女boss不好惹

    青涩蜕变,如今她是能独当一面的女boss,爱了冷泽聿七年,也同样花了七年时间去忘记他。以为是陌路,他突然向他表白,扬言要娶她,她只当他是脑子抽风,他的殷勤她也全都无视。他帮她查她父母的死因,赶走身边情敌,解释当初拒绝她的告别,和故意对她冷漠都是无奈之举。突然爆出她父母的死居然和冷家有丝毫联系,还莫名跳出个公爵未婚夫,扬言要与她履行婚约。峰回路转,破镜还能重圆吗? PS:我又开新文了,每逢假期必书荒,新文《有你的世界遇到爱》,喜欢我的文的朋友可以来看看,这是重生类现言,对这个题材感兴趣的一定要收藏起来。
  • 产后美丽宝典

    产后美丽宝典

    《产后美丽宝典》把产后变化与恢复方法对应结合起来,把身心疾病与医疗预防、母体保健与健康哺乳结合起来,系统而全面,具有很强的实用性和指导性。使年轻的妈妈在产后重塑魅力与自信,教您产后如何成为一个既健康又漂亮的妈妈!
  • 网游之航海世界

    网游之航海世界

    2041年,一款跨时代游戏巨作横空出世,以模拟的形式通过传感器进入虚拟游戏世界,逼真的感受游戏人物的喜怒哀乐、爱恨情仇;切实的以触觉、视觉、嗅觉等感受游戏世界。
  • 追妻无门:女boss不好惹

    追妻无门:女boss不好惹

    青涩蜕变,如今她是能独当一面的女boss,爱了冷泽聿七年,也同样花了七年时间去忘记他。以为是陌路,他突然向他表白,扬言要娶她,她只当他是脑子抽风,他的殷勤她也全都无视。他帮她查她父母的死因,赶走身边情敌,解释当初拒绝她的告别,和故意对她冷漠都是无奈之举。突然爆出她父母的死居然和冷家有丝毫联系,还莫名跳出个公爵未婚夫,扬言要与她履行婚约。峰回路转,破镜还能重圆吗? PS:我又开新文了,每逢假期必书荒,新文《有你的世界遇到爱》,喜欢我的文的朋友可以来看看,这是重生类现言,对这个题材感兴趣的一定要收藏起来。
  • 吃定小青梅

    吃定小青梅

    她是浴火重生的天骄之女,他发誓守候在她身旁的帝都太子爷,她在他的守护下恣意张扬,他看向她永远满眼宠溺,他的原则是什么?他的原则是:白浅菲说的都对,白浅菲做的都好,白浅菲永远都是对的
  • 末世同类

    末世同类

    是末世还是末日?是同伴还是天敌?是罪恶源泉还是世界英雄?我们,还有很多时间……
  • 跨越时空之神国崛起

    跨越时空之神国崛起

    这是一个穿越无数时空,建立无上神国的故事。哈利波特世界-舞舞舞世界-龙蛇世界-雍国世界-舰娘世界—巫师世界