登陆注册
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.

同类推荐
  • 护理英语沟通技能实用手册

    护理英语沟通技能实用手册

    本书是面向国内各医学院护理专业在校生及医疗相关从业人员的一本实用性手册。内容包括患者接待、检查前指导、给药说明、注射治疗和突发情况处理五方面的日常涉外护理情境。全书内容紧扣临床护理沟通人性化这一理念,改变以往护理英语教材关注护士"问什么"和"说什么"的特点,力图把落脚点放在护士在实际工作中"问"和"说"的策略上,强调实用性。为了提高指导性,全书除了向读者提供日常的护患对话外,还设计了读前思考、词汇拓展、策略指导、实用句型以及对话编写练习等部分。相信通过本书的学习,读者们不仅能够提高自己的专业英语会话能力,还可以真正掌握护患英语沟通技巧。
  • 把沉睡的时光摇醒

    把沉睡的时光摇醒

    《把沉睡的时光摇醒》精选了梭罗、海明威、罗斯金、莫里斯、里尔克、笛福、兰姆、马克·吐温、托尔斯泰、毛姆、戴克、怀特、艾默生等50多位全球公认的文学巨匠,近百篇最美的散文,100多幅精美插画。全书精致雅美,传承名家之灵气,有如万般激流在心中翻涌,又似气吞山河的力量,抑或万物如谜般沉默静美,给人无限的想象和心灵滋养。
  • 用耳朵听最优美的讲演

    用耳朵听最优美的讲演

    本系列图书精选的各类故事、散文、演讲、时文及名著片段,均用词精准简洁,语句流畅优美,将引领你进入趣、情、爱与理的博大世界,使你更加充满信心地去追求梦想。这里有嘻嘻哈哈的幽默故事,有体会幸福与生活的感悟故事,有帮你战胜挫折的勇气故事,有闪烁着人性光辉的美德故事,有发人深省的智慧故事,也有在成长路上给你动力的哲理故事。相信本系列图书能为你展现一个美丽新世界并使您的英语学习更上一层楼。
  • The Last Chieftain 妹娃要过河

    The Last Chieftain 妹娃要过河

    故事发生在兵荒马乱年代长江三峡边的一个土家山寨。伍娘是一个哑女,但聪颖过人舞技绝世;无意中撞进山寨的外乡人李安因偷吃土家祭祀的供品受到重罚;土司覃尧看似罚他却是救他,并许诺将伍娘许与李安。伍娘出嫁前夜按照祖先赋予的初夜权,将自己奉献给了神。土司覃尧作为神的化身得到了伍娘但与此同时才发现自己原本深爱着这个女子,从此陷入深深的痛苦。李安不能接受山寨的习俗,将对伍娘的喜爱化成了厌恶和仇恨,不断给纯洁无辜的伍娘以伤害,土司覃尧却因信义而只能默默地忍受煎熬无法相助,火焰一般的爱恨情仇之间,美丽的伍娘以她的生命完成了最后的舞蹈。李安逃离山寨,覃尧在长江边堵住了他,命运将指向何方?
  • 英文爱藏:天使吻过那片海

    英文爱藏:天使吻过那片海

    《天使吻过那片海》既是英语学习爱好者、文学爱好者的必备读 物,也是忙碌现代人的一片憩息心灵的家园,让读者在欣赏原法原味和凝 练生动的英文时,还能多角度、深层次地品读语言特色与艺术之美,再配 合文章后附加的多功能、全方位巩固题型,更有助于理解并学习英……
热门推荐
  • 理念的力量:什么决定中国的未来

    理念的力量:什么决定中国的未来

    本书涵盖了著名经济学家张维迎近年来所主张、研究主要观念,书中论点涉及市场、法治、改革、未来发展等重要领域,列出了作者长期思考的影响社会的二十四个重大理念。本书没有专业的经济学术语,而是用简单形象的类比说明经济现象,解决实际问题,是中国改革最前沿的一流经济学家为普通读者撰写的经济学读物,也是获取正确的经济观念、理解中国经济和世界格局的第一手资料。张维迎教授在八十年代即提出价格双轨制并长期坚持自由市场理论,对中国社会改革和社会观念的影响有目共睹,他的许多观点和预言已被事实所证明,他在本书中所提出的极具预见性的理念,相信也会为我们如何改变现实、面对未来提供重要的参考。
  • 末世狂喵

    末世狂喵

    我抽烟,喝酒,吸薄荷,杀人,爱做饭,但我知道我是一只好猫。我,大橘王,打钱!————新书《真实末日游戏》已发布。
  • 星辰秘密之时光之刀

    星辰秘密之时光之刀

    “时光之刀”是什么样的刀?一万年在宇宙的无始无终时间中,仅仅只是一滴水滴下的声音。玛雅遗迹,神级文明,元老会,“刹那”,意识之剑,“金刚之盾”,“暗物质裂变模式”。“万神之眼”,第11宇宙的狼星,恐龙,意念之力,恐龙与飞船的大战,三眼人与狼人,易经,瑜伽,金字塔,------,星辰之际,烽烟四起,玛雅公主问自己,我到底是谁?
  • 浣熊帮帮忙

    浣熊帮帮忙

    “浣熊,我发现个秘密。”“什么?”“有人暗恋你。”“谁啊?”“我啊。”只是给某个英俊损友帮忙冒充他女友,谁知却对他哥哥一见倾心!但谁承想,就在上天赐予美妙缘分的那一刻,某人竟然嫉妒了。咳咳,重点是,某个男人嫉妒了。哎,不是说好的蓝颜知己吗,怎么总在她春心萌动时拆台?干脆连朋友也别做了!怪不得有人说,男女之间永远不可能存在友情这种高尚的关系。“没错,所以,我们必须要,更进一步。”某人坏坏地说。
  • 流浪地球

    流浪地球

    50亿年的壮丽生涯已成为飘逝的梦幻,太阳死了。幸运的是,还有人活着。地球航出了冥王星轨道,航出了太阳系,在寒冷广漠的外太空继续着它孤独的航程。地球在航行2400年后到达比邻星,再过100年时间,它将泊入这颗恒星的轨道,成为它的一颗卫星。
  • 主播撩爱:金主大人求放过

    主播撩爱:金主大人求放过

    乔亦菲职业主播,天生丽质难自弃,精致的五官,有着古典气质美女的称号,粉丝一大波一大波的向她砸钱,背后还有神秘的金主大人。她和他是网友,相见不相识,却被逼迫嫁给他,她威胁他,婚后不许碰她,否则后果自负。她打的过小三,斗的过渣男,虐的了后妈,外人对她避而远之,他却始终对她温柔如初。夫妻同心,其利断金,一起踩小人。他疼她,宠她,对她无限温柔,然而她却只想逃离。留下一纸离婚协议书,却被他霸气抓回家。左擎天笑的邪魅:“老婆,这姿势你喜欢吗?”--情节虚构,请勿模仿
  • 素刃雍刀

    素刃雍刀

    五年前,神女降世。接踵而至的,却是连绵的战火。西方的骑士与东方的玄师,你死我活,百折不挠。人们都以为那会是场旷日持久的战争……却没想到,它却因为一名玄师的背叛,而草草地落下了帷幕。五年后,少年归来。新安之下的战火伤痕,能否被平静的生活所淡忘?赤子之心的复仇烈焰,又可否找回自身的初衷?超能力系战斗轻小说,素刃雍刀,值得一看。
  • 酒都夜未央

    酒都夜未央

    冷未,一个地地道道的农家子弟,机缘巧合来到了一个叫做酒都的城市,一步步成长,慢慢从抬头仰望的旁观者,成为了俯瞰城市主宰命运的强者。爱情、亲情,官场、商道,都是他的战场。
  • 鬼帝绝宠:皇叔你行不行

    鬼帝绝宠:皇叔你行不行

    前世她活的憋屈,做了一辈子的小白鼠,重活一世,有仇报仇!有怨报怨!弃之不肖!她是前世至尊,素手墨笔轻轻一挥,翻手为云覆手为雨,天下万物皆在手中画。纳尼?负心汉爱上她,要再求娶?当她什么?昨日弃我,他日在回,我亦不肖!花痴废物?经脉尽断武功全无?却不知她一只画笔便虐你成渣……王府下人表示王妃很闹腾,“王爷王妃进宫偷墨宝,打伤了贵妃娘娘…”“王爷王妃看重了,学仁堂的墨宝当场抢了起来,打伤了太子……”“爱妃若想抢随她去,旁边递刀可别打伤了手……”“……”夫妻搭档,她杀人他挖坑,她抢物他递刀,她打太子他后面撑腰……双重性格男主萌萌哒
  • 神话时代来的人

    神话时代来的人

    沙加?阿释密达,在神话时代,作为海神波塞冬的身体,以人类的姿态降生。成年后,波塞冬的灵魂进入体内,继续神的生活。本书讲述的是,沙加在履行神的职责之前,即作为人类、还没有成年之前,参加猎人考试,被送到当代社会,开始现代人生活的故事。