登陆注册
27082000000033

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

同类推荐
  • 生活英语会话想说就会说

    生活英语会话想说就会说

    看到26个字母就鸭梨山大?还是在死磕“哑巴英语”?别担心,本书将生活和英语结合起来,让您在生活中轻轻松松学习英语。其中内容涉及生话英语交流中的各种典型场景。从爱情婚姻、生活起居、购物天地,食全食美、家庭理财、医院就医、家庭汽车、谈天说地和社会问题等方面来展现生活休闲过程中的各种真实情景,所选题材齐全,语言简洁明快,易学好记,实用性强。
  • 澳大利亚学生文学读本(第3册)

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

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

    那些温暖而美好的小事

    或许你在经历一段美好的感情,或许你有好多珍藏的回忆。或许无关爱情无关友情无关亲情,只是来自陌生的霎时温柔。但那些事情,都曾触动你的心弦,在流年碎影里,让你嘴角上扬,相信美好。生活是一场又一场对美好事物的追逐。趁着年轻,制造比夏天还要温暖的事。本书汇集大量经典感人故事、哲理小文,感情纯真,内容温暖动人。用中英文对照的形式,呈现出人类最柔美的情感、最深刻的思考。内容积极健康,很适合青少年学习阅读。
  • 大卫·科波菲尔(有声双语经典)

    大卫·科波菲尔(有声双语经典)

    大卫·科波菲尔是一名命运多舛的遗腹子,他幼年丧母,沦为孤儿,于是投靠姨婆,在她的帮助下开始新生活。他品尝了友谊、爱情带来的欢欣与苦涩,历经了无常世事的磨砺,终于成为一名成功的作家,与至亲爱人幸福地生活在一起。在这部传世经典中,狄更斯通过主人公的坎坷人生和奋斗过程,传递了务实进取、遏恶扬善的道德理想,也勾勒出19世纪英国社会生活的广阔画卷。
  • 双语学习丛书-故乡情怀

    双语学习丛书-故乡情怀

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

    道宋

    汴水如墨,烟云色,良人随风而逝。残垣之处,却还有,故国筝琴萧瑟。狂澜惊现,烽烟四起,蹄声震霄汉。残阳似血,斜照烈士头颅。无奈百载蹉跎,北望燕云兮,金瓯独缺。冲冠一怒,执长槊,搅动血海翻腾。回首凭栏,长啸如哀歌,岁月蹉跎。泡影几许,随我吃茶去也。——《念奴娇—吃茶去》
  • 属于我们少年时代的酸甜

    属于我们少年时代的酸甜

    在青春的消逝里我们见证着彼此的成长,见证着如秦风般的失去如米盈般的拥有;如凌一般的堕落如子琪般的站起;如江猛般的离开如柴桑般的回归,也见证着如题喃一般的失而复得。那么结局会是怎样?
  • 吾欲为圣

    吾欲为圣

    平凡之路,一位少年为解救苍生,协众知音踏上修仙之旅。气化丹田,凝炼元神,冲上九天,踏入元婴,遁入轮回,吾欲为圣!
  • 弑神者兰斯洛

    弑神者兰斯洛

    身为弑神者的兰斯洛总是孤身一人走在弑神的道路上,直到有一天,一个懵懂少年的出现打破了他寂静枯燥的生活,少年的身影与弑神者心中的那团光芒重叠,这次,他还能一如以往地弑神么?
  • 男神朴实无华的生活

    男神朴实无华的生活

    系统:“哦哟,小伙子,你又当男神的体质哟!”叶晨:“我要成为世界第一男神。(●??ω??)?”一个中二少年踏上了从宅男蜕变成男神的路。(本书都市,休闲,不装X)
  • 哈利波特之命运的齿轮

    哈利波特之命运的齿轮

    有着先天性心脏病的叶溪(爱丽丝·波特)死了,但是死前的她,抱着《哈利·波特》。奇妙的是,她穿书了!变成哈利·波特的妹妹—爱丽丝·波特。从她穿书的那一刻起,命运的齿轮就开始转动,这是她的宿命也是她的使命......
  • 我们是一群狼

    我们是一群狼

    世界地下黑拳界霸主赵冰,退隐江湖,本欲淡泊一生,天却不如人愿。当一群各色各样的极品MM朝我扑来时,我又如何?多多益善,泡之!当兄弟陷入困难之时我又当如何?动我兄弟要你命!杀之!你要战我便战,我有狼族兄弟千千万!在那些极品MM面前,我仅仅是一个牛叉的色狼!在杀戮不止血流不停的战场上,我仅仅是一匹嗜血狰狞的血狼!
  • 锦绣未央之毁灭的爱

    锦绣未央之毁灭的爱

    本该是平淡的生活,回到李府也是平静,不想却爱上了自己的哥哥。
  • 从凡人到魔祖

    从凡人到魔祖

    盘古大神开天地,混沌之气化两仪,清者上升化蓝天,浊者下沉变大地,食清气者为仙师,吞浊气者是妖魔……
  • 知情觉

    知情觉

    你想看我有文,经得起批评,受的住赞赏,作品介绍容我再想想