软件工程方法学作业9_答案

合集下载

《软件工程》作业及答案.

《软件工程》作业及答案.

《软件工程》作业及答案1-1 什么是软件危机?它有哪些典型表现?为什么会出现软件危机?答: 软件危机是指在计算机软件的开发和维护过程中所遇到的一系列严重问题。

概括地说,软件危机包含下述两方面的问题:如何开发软件,以满足对软件日益增长的需求;如何维护数量不断膨胀的已有软件。

软件危机典型表现:对软件开发成本和进度的估计常常很不准确。

用户对“已完成的”软件系统不满意的现象经常发生。

软件产品的质量往往靠不住。

软件常常是不可维护的。

软件通常没有适当的文档资料。

软件成本在计算机系统总成本中所占的比例逐年上升。

软件开发生产率提高的速度,远远跟不上计算机应用迅速普及深入的趋势。

产生软件危机的原因:一方面与软件本身的特点有关,另一方面也和软件开发与维护的方法不正确有关。

软件不同于硬件,它是计算机系统中的逻辑部件而不是物理部件。

管理和控制软件开发过程相当困难。

软件是规模庞大,而且程序复杂性将随着程序规模的增加而呈指数上升。

目前相当多的软件专业人员对软件开发和维护还有不省糊涂观念,在实践过程中或多或少地采用了错误的方法和技术,这是使软件问题发展成软件危机的主要原因。

1-2 假设你是一家软件公司的总工程师,当你把图1.1给手下的软件工程师们观看,告诉他们及早发现并改正错误的重要性时,有人不同意你的观点,认为要求在错误进入软件之前就清除它们是不现实的,并举例说:“如果一个故障是编码错误造成的,那么,一个人怎么能在设计阶段清除它呢?”你怎么反驳他?1-3 什么是软件工程?它有哪些本质特性?怎样用软件工程消除软件危机?答: 软件工程是指导计算机软件开发和维护的一门工程学科。

采用工程的概念、原理、技术和方法来开发与维护软件,把经过时间考验而证明正确的管理技术和当前能够得到的最好的技术方法结合起来,以经济地开发出高质量的软件并有效地维护它。

软件工程本质特性:1、软件工程关注于大型程序的构造;2、软件工程的中心课题是控制复杂性;3、软件经常变化;4、开发软件的效率非常重要;5、和谐地合作是开发软件的关键;6、软件必须有效地支持它的用户;7、在软件工程领域中是由具有一种文化背景的人替具有另一种文化背景的人创造产品。

软件工程第9版部分习题答案

软件工程第9版部分习题答案

习题参考答案Exercises(Homework): P251.3 What are the four important attributes that all professional software should have? Suggest four other attributes that may sometimes be significant.Answer:Four important attributes are maintainability, dependability, performance and usability. Other attributes that may be significant could be reusability (can it be reused in other applications), distributability (can it be distributed over a network of processors), portability (can it operate on multiple platforms e.g laptop and mobile platforms) and inter-operability (can it work with a wide range of other software systems).Decompositions of the 4 key attributes e.g. dependability decomposes to security, safety, availability, etc. is also a valid answer to this question.2.1Giving reasons for your answer based on the type of system being developed, suggest the most appropriate generic software process model that might be used as a basis for managing the development of the following systems:• A system to control anti-lock braking in a car• A virtual reality system to support software maintenance• A university accounting system that replaces an existing system • An interactive travel planning system that helps users plan journeys with the lowest environmental impactAnswer:1. Anti-lock braking system This is a safety-critical system so requiresa lot of up-front analysis before implementation. It certainly needs a plan-driven approach to development with the requirements carefully analysed. A waterfall model is therefore the most appropriate approach to use, perhaps with formal transformations between the different development stages.2. Virtual reality system This is a system where the requirements will change and there will be an extensive user interface components. Incremental development with, perhaps, some UI prototyping is the most appropriate model. An agile process may be used.3. University accounting system This is a system whose requirements are fairly ell-known and which will be used in an environment in conjunction with lots of other stems such as a research grant management system. Therefore, a reuse-based proach is likely to be appropriate for this.4. Interactive travel planning system System with a complex userinterface but which must be stable and reliable. An incremental development approach is the most appropriate as the system requirements will change as real user experience with the system is gained.2.4Suggest why it is important to make a distinction between developing the user requirements and developing system requirements in the requirements engineering process.Answer:There is a fundamental difference between the user and the system requirements that mean they should be considered separately.1. The user requirements are intended to descri be the system’s functions and features from a user perspective and it is essential that users understand these requirements. They should be expressed in natural language and may not be expressed in great detail, to allow some implementation flexibility. The people involved in the process must be able to understand the user’s environment and application domain.2. The system requirements are much more detailed than the user requirements and are intended to be a precise specification of the system that may be part of a system contract. They may also be used in situations where development is outsourced and the development team need a complete specification of what should be developed. The system requirements are developed after user requirements have been established.Excercises(Homework): P1164.2,*4.44.2Discover ambiguities or omissions in the following statement of requirements for part of a ticket-issuing system:An automated ticket-issuing system sells rail tickets. Users select their destination and input a credit card and a personal identification number.The rail ticket is issued and their credit card account charged. When the user presses the start button, a menu display of potential destinations is activated, along with a message to the user to select a destination. Once a destination has been selected, users are requested to input their credit card.Its validity is checked and the user is then requested to input a personal identifier. When the credit transaction has been validated, the ticket is issued.Answer:Ambiguities and omissions include:●• Can a customer buy several tickets for the same destination togetheror must they be bought one at a time?●• Can customers cancel a request if a mistake has been made?●• How should the system respond if a n invalid card is input?●• What happens if customers try to put their card in before selectinga destination (as they would in ATM machines)?●• Must the user press the start button again if they wish to buy anotherticket to a different destination?●• Shou ld the system only sell tickets between the station where themachine is situated and direct connections or should it include all possible destinations?4.4Write a set of non-functional requirements for the ticket-issuing system, setting out its expected reliability and response time.Answer:Possible non-functional requirements for the ticket issuing system include:1. Between 0600 and 2300 in any one day, the total system down time should not exceed 5 minutes.2. Between 0600 and 2300 in any one day, the recovery time after a system failure should not exceed 2 minutes.3. Between 2300 and 0600 in any one day, the total system down time should not exceed 20 minutes.All these are availability requirements –note that these vary according to the time of day. Failures when most people are traveling are less acceptable than failures when there are few customers.4. After the customer presses a button on the machine, the display should be updated within 0.5 seconds.5. The ticket issuing time after credit card validation has been received should not exceed 10 seconds.6. When validating credit cards, the display should provide a status message for customers indicating that activity is taking place. This tells the customer that the potentially time consuming activity of validation is still in progress and that the system has not simply failed.7. The maximum acceptable failure rate for ticket issue requests is 1: 10000.Excercises(Homework): P143-1445.2,5.5,5.6,5.75.2How might you use a model of a system that already exists? Explain whyit is not always necessary for such a system model to be complete and correct. Would the same be true if you were developing a model of a new system?Answer:You might create and use a model of a system that already exists for the followingreasons:1. To understand and document the architecture and operation of the existingsystem.2. To act as the focus of discussion about possible changes to that system.3. To inform the re-implementation of the system.You do not need a complete model unless the intention is to completely document the operation of the existing system. The aim of the model in such cases is usually to help you work on parts of the system so only these need to be modelled. Furthermore, if the model is used as a discussion focus, you are unlikely to be interested in details and so can ignore parts of the system in the model.This is true, in general, for models of new systems unless a model-based approach to development is taking place in which case a complete model is required. The other circumstances where you may need a complete model is when there is a contractual requirement for such a model to be produced as part of the system documentation.5.5Develop a sequence diagram showing the interactions involved when a student registers for a course in a university. Courses may have limited enrolment, so the registration process must include checks that places are available. Assume that the student accesses an electronic course catalog to find out about available courses.Answer:A relatively simple diagram is all that is needed here. It is best not to be too fussy about things like UML arrow styles as hardly anyone can remember the differences between them.5.6Look carefully at how messages and mailboxes are represented in the email system that you use. Model the object classes that might be used in the system implementation to represent a mailbox and an e-mail message. Answer:5.7Based on your experience with a bank ATM, draw an activity diagram that models the data processing involved when a customer withdraws cash from the machine.Answer:Notice that I have not developed the activities representing other services or failed authentication.Excercises(Homework): P173-1746.1,6.3,6.96.1When describing a system, explain why you may have to design the system architecture before the requirements specification is complete.Answer:The architecture may have to be designed before specifications are written to provide a means of structuring the specification and developing different subsystem specifications concurrently, to allow manufacture of hardware by subcontractors and to provide a model for system costing.6.3Explain why design conflicts might arise when designing an architecture for which both availability and security requirements are the most important non-functional requirements.Answer:Fundamentally, to provide availability, you need to have (a) replicated components in the architecture so that in the event of one component failing, you can switch immediately to a backup component. You also need to have several copies of the data that is being processed. Security requires minimizing the number of copies of the data and, wherever possible, adopting an architecture where each component only knows as much as it needs to, to do its job. This reduces the chance of intrudersaccessing the data.Therefore, there is a fundamental architectural conflict between availability (replication, several copies) and security (specialization, minimal copies). The system architect has to find the best compromise between these fundamentally opposing requirements.6.9Using the basic model of an information system as presented in Figure 6.16, suggest the components that might be part of an information system thatallows users to view information about flights arriving and departing from a particular airport.Answer:Students should consider the levels in the information system and should identify components that might be included at each level. Examples of these componentsmight be:Level 1 (Database level)Flight database; Flight status database; Airport information; Level 2: (Information retrieval level)Status management; Flight management; Search;Level 3: (User interaction level)Authentication; session management; forms processing () Level 4 (User interface)Input checking (Javascript), browserExcercises(Homework): P202-2037.1, 7.37.17.1 Using the structured notation shown in Figure 7.3, specify the weather station use cases for Report status and Reconfigure. You should make reasonable assumptions about the functionality that is required here.Answer:7.37.3 Using the UML graphical notation for object classes, design the following object classes, identifying attributes and operations. Use your own experience to decide on the attributes and operations that should be associated with these objects.• a telephone• a printer for a personal computer• a personal stereo system• a bank account• a library catalogueAnswer:There are many possible designs here and a great deal of complexity can be added to the objects. However, I am only really looking for simple objects which encapsulate the principal requirements of these artefacts. Possible designs are shown in the above diagram.。

软件工程第9版部分习题答案

软件工程第9版部分习题答案

习题参考答案Exercises(Homework): P251.3 What are the four important attributes that all professional software should have? Suggest four other attributes that may sometimes be significant.Answer:Four important attributes are maintainability, dependability, performance and usability. Other attributes that may be significant could be reusability (can it be reused in other applications), distributability (can it be distributed over a network of processors), portability (can it operate on multiple platforms e.g laptop and mobile platforms) and inter-operability (can it work with a wide range of other software systems).Decompositions of the 4 key attributes e.g. dependability decomposes to security, safety, availability, etc. is also a valid answer to this question.2.1Giving reasons for your answer based on the type of system being developed, suggest the most appropriate generic software process model that might be used as a basis for managing the development of the following systems:• A system to control anti-lock braking in a car• A virtual reality system to support software maintenance• A university accounting system that replaces an existing system • An interactive travel planning system that helps users plan journeys with the lowest environmental impactAnswer:1. Anti-lock braking system This is a safety-critical system so requiresa lot of up-front analysis before implementation. It certainly needs a plan-driven approach to development with the requirements carefully analysed. A waterfall model is therefore the most appropriate approach to use, perhaps with formal transformations between the different development stages.2. Virtual reality system This is a system where the requirements will change and there will be an extensive user interface components. Incremental development with, perhaps, some UI prototyping is the most appropriate model. An agile process may be used.3. University accounting system This is a system whose requirements are fairly ell-known and which will be used in an environment in conjunction with lots of other stems such as a research grant management system. Therefore, a reuse-based proach is likely to be appropriate for this.4. Interactive travel planning system System with a complex userinterface but which must be stable and reliable. An incremental development approach is the most appropriate as the system requirements will change as real user experience with the system is gained.2.4Suggest why it is important to make a distinction between developing the user requirements and developing system requirements in the requirements engineering process.Answer:There is a fundamental difference between the user and the system requirements that mean they should be considered separately.1. The user requirements are intended to descri be the system’s functions and features from a user perspective and it is essential that users understand these requirements. They should be expressed in natural language and may not be expressed in great detail, to allow some implementation flexibility. The people involved in the process must be able to understand the user’s environment and application domain.2. The system requirements are much more detailed than the user requirements and are intended to be a precise specification of the system that may be part of a system contract. They may also be used in situations where development is outsourced and the development team need a complete specification of what should be developed. The system requirements are developed after user requirements have been established.Excercises(Homework): P1164.2,*4.44.2Discover ambiguities or omissions in the following statement of requirements for part of a ticket-issuing system:An automated ticket-issuing system sells rail tickets. Users select their destination and input a credit card and a personal identification number.The rail ticket is issued and their credit card account charged. When the user presses the start button, a menu display of potential destinations is activated, along with a message to the user to select a destination. Once a destination has been selected, users are requested to input their credit card.Its validity is checked and the user is then requested to input a personal identifier. When the credit transaction has been validated, the ticket is issued.Answer:Ambiguities and omissions include:●• Can a customer buy several tickets for the same destination togetheror must they be bought one at a time?●• Can customers cancel a request if a mistake has been made?●• How should the system respond if an invalid card is input?●• What happens i f customers try to put their card in before selectinga destination (as they would in ATM machines)?●• Must the user press the start button again if they wish to buy anotherticket to a different destination?●• Should the system only sell tickets between t he station where themachine is situated and direct connections or should it include all possible destinations?4.4Write a set of non-functional requirements for the ticket-issuing system, setting out its expected reliability and response time.Answer:Possible non-functional requirements for the ticket issuing system include:1. Between 0600 and 2300 in any one day, the total system down time should not exceed 5 minutes.2. Between 0600 and 2300 in any one day, the recovery time after a system failure should not exceed 2 minutes.3. Between 2300 and 0600 in any one day, the total system down time should not exceed 20 minutes.All these are availability requirements –note that these vary according to the time of day. Failures when most people are traveling are less acceptable than failures when there are few customers.4. After the customer presses a button on the machine, the display should be updated within 0.5 seconds.5. The ticket issuing time after credit card validation has been received should not exceed 10 seconds.6. When validating credit cards, the display should provide a status message for customers indicating that activity is taking place. This tells the customer that the potentially time consuming activity of validation is still in progress and that the system has not simply failed.7. The maximum acceptable failure rate for ticket issue requests is 1: 10000.Excercises(Homework): P143-1445.2,5.5,5.6,5.75.2How might you use a model of a system that already exists? Explain whyit is not always necessary for such a system model to be complete and correct. Would the same be true if you were developing a model of a new system?Answer:You might create and use a model of a system that already exists for the followingreasons:1. To understand and document the architecture and operation of the existingsystem.2. To act as the focus of discussion about possible changes to that system.3. To inform the re-implementation of the system.You do not need a complete model unless the intention is to completely document the operation of the existing system. The aim of the model in such cases is usually to help you work on parts of the system so only these need to be modelled. Furthermore, if the model is used as a discussion focus, you are unlikely to be interested in details and so can ignore parts of the system in the model.This is true, in general, for models of new systems unless a model-based approach to development is taking place in which case a complete model is required. The other circumstances where you may need a complete model is when there is a contractual requirement for such a model to be produced as part of the system documentation.5.5Develop a sequence diagram showing the interactions involved when a student registers for a course in a university. Courses may have limited enrolment, so the registration process must include checks that places are available. Assume that the student accesses an electronic course catalog to find out about available courses.Answer:A relatively simple diagram is all that is needed here. It is best not to be too fussy about things like UML arrow styles as hardly anyone can remember the differences between them.5.6Look carefully at how messages and mailboxes are represented in the email system that you use. Model the object classes that might be used in the system implementation to represent a mailbox and an e-mail message. Answer:5.7Based on your experience with a bank ATM, draw an activity diagram that models the data processing involved when a customer withdraws cash from the machine.Answer:Notice that I have not developed the activities representing other services or failed authentication.Excercises(Homework): P173-1746.1,6.3,6.96.1When describing a system, explain why you may have to design the system architecture before the requirements specification is complete.Answer:The architecture may have to be designed before specifications are written to provide a means of structuring the specification and developing different subsystem specifications concurrently, to allow manufacture of hardware by subcontractors and to provide a model for system costing.6.3Explain why design conflicts might arise when designing an architecture for which both availability and security requirements are the most important non-functional requirements.Answer:Fundamentally, to provide availability, you need to have (a) replicated components in the architecture so that in the event of one component failing, you can switch immediately to a backup component. You also need to have several copies of the data that is being processed. Security requires minimizing the number of copies of the data and, wherever possible, adopting an architecture where each component only knows as much as it needs to, to do its job. This reduces the chance of intrudersaccessing the data.Therefore, there is a fundamental architectural conflict between availability (replication, several copies) and security (specialization, minimal copies). The system architect has to find the best compromise between these fundamentally opposing requirements.6.9Using the basic model of an information system as presented in Figure 6.16, suggest the components that might be part of an information system thatallows users to view information about flights arriving and departing from a particular airport.Answer:Students should consider the levels in the information system and should identify components that might be included at each level. Examples of these componentsmight be:Level 1 (Database level)Flight database; Flight status database; Airport information; Level 2: (Information retrieval level)Status management; Flight management; Search;Level 3: (User interaction level)Authentication; session management; forms processing () Level 4 (User interface)Input checking (Javascript), browserExcercises(Homework): P202-2037.1, 7.37.17.1 Using the structured notation shown in Figure 7.3, specify the weather station use cases for Report status and Reconfigure. You should make reasonable assumptions about the functionality that is required here.Answer:7.37.3 Using the UML graphical notation for object classes, design the following object classes, identifying attributes and operations. Use your own experience to decide on the attributes and operations that should be associated with these objects.• a teleph one• a printer for a personal computer• a personal stereo system• a bank account• a library catalogueAnswer:There are many possible designs here and a great deal of complexity can be added to the objects. However, I am only really looking for simple objects which encapsulate the principal requirements of these artefacts. Possible designs are shown in the above diagram.。

软件工程(第四版)习题及解答9-8

软件工程(第四版)习题及解答9-8
(3)系统流程图
第3章
一、判断题
1√ 2 × 3√ 4 × 5√ 6× 7× 8√
二、选择题
1-5 BACDB 6-10 ABDAA 11-15 BABDB 16-20 ADCDB
三、简答题
1、需求分析的基本任务是要准确地理解旧系统、定义新系统的目标,为了满足用户需要,回答“系统必须做什么”的问题,即确定系统必须完成哪些工作,对新系统提出完整、准确、清晰、具体的要求。
数据流图的主要成分有四种:数据流、数据存储、加工、数据流的源点和终点。
4、
数据词典是数据的集合,它对数据流图中的各个元素作完整的定义和说明,是数据流图的补充工具。数据流图和数据词典共同构成系统的逻辑模型,两者缺一不可。
其内容包括:数据流、数据项、数据结构、数据存储、加工逻辑、外部实体6类元素。
四、应用题
2、软件危机的产生有两方面因素,一方面与软件本身的抽象性和复杂性有关;另一方面则与软件开发和维护过程中使用的技术和方法有关,这是主观原因。
为了解决软件危机,既要有技术措施(好的方法和工具),也要有组织管理措施。(1)使用好的软件开发技术和方法。(2)使用好的软件开发工具,提高软件生产率。(3)有良好的组织、严密的管理,各方面人员相互配合共同完成任务。
专业=”01”...”99”注:专业代号2位数字
班级=”01”...”99”注:班级代号2位数字
学分=0..99
2、数据流图如下:
3、
顶层图:
顶层图
0层图:
0层图
4、
判定表如下:
设:性别:男:M女:F
学历:初中:A高中B大专:C
年龄:小于25: C25至40:Y40以上:L
1
2
3
4

软件工程试题与答案

软件工程试题与答案

一、填空1.结构化分析方法的分析策略是。

2.衡量模块独立性的两个定性标准是耦合性与内聚性。

3.软件集成测试的方法主要有两种,它们是渐增式与非渐增式测试。

4.可行性研究的目的是用最小的代价在尽可能短的时间内确定该软件项目是否值得开发。

5•需求分析阶段,分析人员要确定对问题的综合需求,其中最主要的是功能需求。

6.软件生存周期中时间最长、花费的精力和费用最多的一个阶段是维护一阶段。

7.计算机辅助软件工程这一术语的英文缩写为CASE。

8.McCall提出的软件质量模型包括一11个软件质量特性。

9.软件结构是以一模块为基础而组成的一种控制层次结构。

10.软件概要设计的主要任务就是软件结构的设计。

11.结构化稈序设计方法是使用三种基本控制结构(条件\控制\循环)构造稈序。

12.在建立对象的功能模型时,使用的数据流图中包含有处理、数据流、动作对象和_数据存储对象二、选择1、UML是软件开发中的一个重要工具,它主要应用于哪种软件开发方法(C)A、基于瀑布模型的结构化方法B、基于需求动态定义的原型化方法C、基于对象的面向对象的方法D、基于数据的数据流开发方法2、面向对象的开发方法中,(B)将是面向对象技术领域内占主导地位的标准建模语言。

A、Booch方法B、UML语言C、OMT方法D、Coad方法3、功能模型中所有的(A)往往形成一个层次结构。

在这个层次结构中一个数据流图的过程可以由下一层的数据流图作进一步的说明。

A、数据流图B、概念模型图C、状态迁移图D、事件追踪图4、(A)应当在应用分析之前进行,因为我们在了解问题之前应当对问题敞开思想考虑,不应加以限制。

A、问题域分析B、高层分析C、实例的建立D、类的开发5、通过执行对象的操作改变对象的属性,但它必须通过(B)的传递。

A、接口B、消息C、信息D、操作6、所有的对象可以成为各种对象类,每个对象类都定义了一组(B)A、说明B、方法C、过程D、类型9、面向对象的主要特征除对象唯一性、封装、继承外,还有(A)A、多态性B、完整性C、可移植性D、兼容10、在面向对象的设计中,我们应遵循的设计准则除了模块化、抽象、低耦合、高内聚以外,还有(B)A、隐藏复杂性B、信息隐藏C、即存类的重用D、类的开发13.在考察系统的一些涉及时序和改变的状况时,要用动态模型来表示。

(完整版)软件工程课后习题答案

(完整版)软件工程课后习题答案

第一章1.1什么是计算机软件?软件的特点是什么?计算机软件是指计算机系统中的程序及其文档软件的特点:●软件是一种逻辑实体,而不是有形的系统元件,其开发成本和进度难以准确地估算。

●软件是被开发的或被设计的,没有明显的制造过程,一旦开发成功,只需复制即可,但其维护的工作量大。

●软件的使用没有硬件那样的机械磨损和老化问题。

1.2简述软件的分类,并举例说明1.系统软件系统软件居于计算机系统中最接近硬件的一层,其他软件一般都通过系统软件发挥作用。

例如:编译软件、操作系统。

2.支撑软件支撑软件是支撑软件的开发和维护的软件。

例如:数据库管理系统、网络软件、软件工具、软件开发环境。

3.应用软件应用软件是特定应用领域专用的软件。

例如:工程/科学计算机软件、嵌入式软件、产品线软件、Web应用软件、人工智能软件。

1.3简述软件语言的分类,并举例说明。

1.需求定义语言是用于书写软件需求定义的语言。

例如:PSL/PSA。

2.功能性语言是用于书写软件功能规约的语言,通常又称为功能规约语言。

例如:广谱语言、Z 语言。

3.设计性语言是用于书写软件设计规约的语言。

例如:PDL。

4.实现性语言也称为程序设计语言,是用于书写计算机程序的语言。

例如:C、java、PROLOG、FORTRAN、COBOL、Modula。

5.文档语言是用于书写软件文档的语言。

通常用自然语言或半形式化语言书写。

1.4什么是软件工程?软件工程是应用计算机科学、数学及管理科学等原理,开发软件的工程。

软件工程借鉴传统工程的原则、方法,以提高质量、降低成本为目的。

1.5简述软件工程的基本原则。

软件工程原则包括围绕工程设计、工程支持和工程管理所提出的以下4条基本原则。

1.选取适宜的开发模型必须认识需求定义的易变性,采用适宜的开发模型,保证软件产品满足用户的要求。

2.采用合适的设计方法合适的设计方法有助于这些特征的实现,以达到软件工程的目标。

3.提供高质量的工程支撑软件工程项目的质量与开销直接取决于对软件工程所提供的支撑质量和效用。

软件工程(第五版)--习题及答案---第九章

软件工程(第五版)--习题及答案---第九章

一、判断题1、(×)测试是为了验证该软件以正确地实现了用户的需求。

2、(√)发现错误多的程序模块,残留在模块中的错误也多。

3、(×)白盒测试法是根据程序的功能来设计测试用例的。

4、(×)黑盒法是根据程序的内部逻辑来设计测试用例的。

5、(√)确定测试计划是在需求分析阶段制定的.6、(√)集成测试计划是在概要设计阶段制定的。

7、(√)单元测试是在编码阶段完成的。

8、(√)集成测试工作最好由不属于该软件开发组的软件设计人员承担。

9、(√)为了提高软件的测试效率,测试工作需要有测试工具的支持.10、(×)在做程序的单元测试时,桩模块比驱动模块容易编写。

二、选择题1、测试用例是专门为了发现软件错误而设计的一组或多组数据,它由(C)组成。

A、测试输入数据B、预期的测试输出数据C、测试输入与预期的输出数据D、按照测试用例设计方法设计出的数据2、测试和调试最大的不同在于(A)。

A、操作者的心理状态不同B、它们的行为取向不同C、使用的工具不同D、运用的方法不同3、一个成功的测试是(B)。

A、发现错误B、发现至今尚未发现的错误C、没有发现错误D、证明发现不了错误4、白盒法和黑盒法最大的不同在于(A).A、测试用例设计方法不同B、测试的任务不同C、应用的测试阶段不同D、基于的知识集不同5、单元测试阶段主要涉及(D)的文档。

A、需求设计B、编码和详细设计C、详细设计D、概要设计6、检查软件产品是否符合需求定义的过程称为(A).A、确认测试B、集成测试C、验证测试D、验收测试7、软件调试的目的是(B)。

A、发现错误B、改正错误C、改善软件的性能D、挖掘软件的潜能8、进行软件测试的目的是(A)。

A、尽可能多地找出软件中的错误B、缩短软件的开发时间C、减少软件的维护成本D、证明程序没有缺陷9、选择一个适当的测试用例,用于测试下面的程序,能达到判定覆盖的是(C)。

A、B、10、在进行单元测试时,常用的方法是(A )。

《软件工程》作业及答案

《软件工程》作业及答案

《软件工程》作业及答案 1-1 什么是软件危机?它有哪些典型表现?为什么会出现软件危机? 答: 软件危机是指在计算机软件的开发和维护过程中所遇到的一系列严重问题。

概括地说,软件危机包含下述两方面的问题:如何开发软件,以满足对软件日益增长的需求;如何维护数量不断膨胀的已有软件。

软件危机典型表现:对软件开发成本和进度的估计常常很不准确。

用户对“已完成的”软件系统不满意的现象经常发生。

软件产品的质量往往靠不住。

软件常常是不可维护的。

软件通常没有适当的文档资料。

软件成本在计算机系统总成本中所占的比例逐年上升。

软件开发生产率提高的速度,远远跟不上计算机应用迅速普及深入的趋势。

产生软件危机的原因:一方面与软件本身的特点有关,另一方面也和软件开发与维护的方法不正确有关。

软件不同于硬件,它是计算机系统中的逻辑部件而不是物理部件。

管理和控制软件开发过程相当困难。

软件是规模庞大,而且程序复杂性将随着程序规模的增加而呈指数上升。

目前相当多的软件专业人员对软件开发和维护还有不省糊涂观念,在实践过程中或多或少地采用了错误的方法和技术,这是使软件问题发展成软件危机的主要原因。

1-2 假设你是一家软件公司的总工程师,当你把图1.1给手下的软件工程师们观看,告诉他们及早发现并改正错误的重要性时,有人不同意你的观点,认为要求在错误进入软件之前就清除它们是不现实的,并举例说:“如果一个故障是编码错误造成的,那么,一个人怎么能在设计阶段清除它呢?”你怎么反驳他?1-3 什么是软件工程?它有哪些本质特性?怎样用软件工程消除软件危机?答: 软件工程是指导计算机软件开发和维护的一门工程学科。

采用工程的概念、原理、技术和方法来开发与维护软件,把经过时间考验而证明正确的管理技术和当前能够得到的最好的技术方法结合起来,以经济地开发出高质量的软件并有效地维护它。

软件工程本质特性:1、软件工程关注于大型程序的构造;2、软件工程的中心课题是控制复杂性;3、软件经常变化;4、开发软件的效率非常重要;5、和谐地合作是开发软件的关键;6、软件必须有效地支持它的用户;7、在软件工程领域中是由具有一种文化背景的人替具有另一种文化背景的人创造产品。

软件工程方法学作业_答案

软件工程方法学作业_答案

1、软件设计一般分为总体设计与详细设计,它们之间得关系就是( B )。

A、全局与局部B、抽象与具体C、总体与层次D、功能与结构2、软件结构使用得图形工具,一般采用( C )图。

A、DFDB、PADC、SCD、E-R3、下列中属于软件设计得基本原理得就是( D )。

A、数据流分析设计B、变换流分析设计C、事务流分析设计D、模块化4、在软件结构得后处理中,下列说法错误得就是( E )。

A、为模块写得处理说明及接口说明可采用IPO图B、数据结构得描述可用Warnier图或Jackson图C、给出设计约束或限制。

如数据得边界值、数据类型、格式、内存容量及时间得限制D、在概要设计评审中,应着重评审软件需求就是否得到满足及软件结构得质量等E、设计得优化工作主要放在软件结构设计得后处理阶段5、在分层数据流图映射成软件结构得设计中,下列说法错误得就是( D )。

A、分层得数据流图映射成软件结构图也应该就是分层得B、软件结构图得物理输入与输出部分放在主图中较为合适C、分层DFD图得映射方法:主图就是变换型,子图就是事务型;或主图就是事务型,子图就是变换型D、变换型通常用于高层数据流图得转换,而事务型通常用于较低层数据流图得转换6、软件设计阶段一般又可分为( B )。

A、逻辑设计与功能设计B、概要设计与详细设计C、概念设计与物理设计D、模型设计与程序设计7、结构图中,不就是其主要成分得就是( C )。

A、模块B、模块间传递得数据C、模块内部数据D、模块得控制关系8、好得软件结构应该就是( B )。

A、高耦合、高内聚B、低耦合、高内聚C、高耦合、低内聚D、低耦合、低内聚9、结构分析方法就就是面向( B )自顶向下逐步求精进行需求分析得方法。

A、目标B、数据流C、功能D、对象10、程序内部得各个部分之间存在得联系,用结构图表达时,最关心得就是模块得内聚性与( C )。

A、独立性B、有效性C、耦合性D、安全性11、程序内部得各个部分之间存在得联系,用结构图表达时,最关心得就是模块得( D)与耦合性。

软件工程习题答案

软件工程习题答案

软件⼯程习题答案第1章软件⼯程概述参考答案⼀. 选择题1. B2. A3. B4. B5. D6. B7. D8. A9. D⼆. 填空题1. 设计编码测试2. 软件费⽤可靠性可维护性可重⽤性及⽣产率等3. 计算机软件开发和维护4. 分解抽象和信息隐蔽⼀致性确定性5. 软件的总⽬标待开发软件的需求6. ⼆三7. 计划阶段开发阶段维护阶段8. 软件需求明确9. 制定计划风险分析开发实施⽤户评估三. 名词解释1. 软件的定义如下:在运⾏中能提供所希望的功能和性能的指令集,使程序能正确运⾏的数据结构,描述程序研制过程和⽅法所⽤的⽂档。

2. 软件⼯程是指导计算机软件开发和维护的⼀门学科。

3. 软件危机指的是软件开发和维护过程中遇到的⼀系列严重问题。

4. 就是从提出软件产品开始,直到该软件产品被淘汰的全过程。

5. 瀑布模型⼜称⽣存周期模型,由B.M.Boehm提出,是软件⼯程的基础模型。

其核⼼思想是按⼯序将问题化简,将功能的实现与设计分开,便于分⼯协作。

6. 螺旋模型将瀑布模型与演化模型结合起来,并且加⼊两种模型均忽略了的风险分析,弥补了两者的不⾜。

四. 简答题1. 软件既是知识产品,⼜是与汽车,建筑物⼀样的⼯业产品,此外,软件还具有类似艺术,学术那样的知识性创造和特点,软件的特点如下:软件是⼀种逻辑实体,⽽不是具体的物理实体,因⽽它具有抽象性;软件是通过⼈们的智⼒活动,把知识与技术转化成信息的⼀种产品,是在研制、开发中被创造出来的;在软件的运⾏和使⽤期间,没有硬件那样的机械磨损、⽼化问题;软件的开发和运⾏经常受到计算机系统的限制,对计算机系统有着不同程度的依赖关系;软件的开发尚未完全摆脱⼿⼯的开发⽅式;软件的开发费⽤越来越⾼,成本相当昂贵;软件的开发是⼀个复杂的过程,因⽽管理是软件开发过程中必不可少的內容。

2. 软件危机主要表现如下:产品不符合⽤户的实际需要;软件开发⽣产率提⾼的速度远远不能满⾜客观需要,软件的⽣产率远远低于硬件⽣产率和计算机应⽤的增长速度,使⼈们不能充分利⽤现代计算机硬件提供的巨⼤潜⼒;软件产品的质量差;对软件开发成本和进度的估计常常不准确;软件的可维护性差;软件⽂档资料通常既不完整也不合格;软件的价格昂贵,软件成本在计算机系统总成本中所占的⽐例逐年上升。

软件工程作业9(含答案)

软件工程作业9(含答案)

软件工程作业9(含答案)1. 请从供选择的答案中选出应填入下列()中的字句。

程序的三种基本控制结构是(A2 )。

它们的共同点是( B 4)。

结构化程序设计的一种基本方法是(C 4 )。

软件测试的目的是(D 2 )。

软件调试的目的是( E 1)。

供选择的答案:A. ①过程,子程序,分程序②顺序,条件,循环③递归,堆栈,队列④调用,返回,转移B. ①不能嵌套使用②只能用来写简单的程序③已经用硬件实现④只有一个入口和一个出口C. ①筛选法②递归法③归纳法④逐步求精法D. ①证明程序中没有错误②发现程序中的错误③测量程序的动态特性④检查程序中的语法错误E. ①找出错误所在并改正之②排除存在错误的可能性③对错误性质进行分类④统计出错的次数2.从下列关于软件测试的叙述中,选出5条正确的叙述。

4.5.6.7.10(1) 用黑盒法测试时,测试用例是根据程序内部逻辑设计的。

(2) 尽量用公共过程或子程序去代替重复的代码段。

(3) 测试是为了验证该软件已正确地实现了用户的要求。

(4) 对于连锁型分支结构,若有n个判定语句,则有2n条路径。

(5) 尽量采用复合的条件测试,以避免嵌套的分支结构。

(6) GOTO语句概念简单,使用方便,在某些情况下,保留GOTO 语句反能使写出的程序更加简洁。

(7) 发现错误多的程序模块,残留在模块中的错误也多。

(8) 黑盒测试方法中最有效的是因果图法。

(9) 在做程序的单元测试时,桩(存根)模块比驱动模块容易编写。

(10) 程序效率的提高主要应通过选择高效的算法来实现。

3.从供选择的答案中选出应填入下面有关软件测试的叙述的()内的正确答案。

软件测试方法可分为黑盒测试法和白盒测试法两种。

黑盒测试法是通过分析程序的( A 3)来设计测试用例的方法。

除了测试程序外,它还适用于对( B 4 )阶段的软件文档进行测试。

白盒测试法是根据程序的( C 2)来设计测试用例的方法。

除了测试程序外,它也适用于对( D 2 )阶段的软件文档进行测试。

软件工程题库(含答案)

软件工程题库(含答案)

软件工程题库(含答案)一、单选题(共60题,每题1分,共60分)1、软件按照设计的要求,在规定时间和条件下达到不出故障,持续运行的要求的质量特性称为( )A、可用性B、正确性C、完整性D、可靠性正确答案:D2、软件特性中,软件从一个计算机系统或环境移植到另一个上去的难易程度指的是( ).A、可移植性B、可理解性C、可重用性D、可修改性正确答案:A3、在软件质量要素的评价准则中,操作该软件的难易程度指的是( )。

A、容错性B、检测性C、可操作性D、安全性正确答案:C4、下列属于维护阶段的文档是( )A、软件问题报告B、用户操作手册C、软件测试分析报告D、软件规格说明正确答案:B5、快速原型模型的主要特点之一是( )A、及早提供工作软件B、开发完毕才见到产品C、及早提供全部完整的软件产品D、开发完毕后才见到工作软件正确答案:C6、可维护性通常包括( )。

A、可用性和可理解性B、可修改性、数据独立性和数据一致性C、可理解性、可修改性和可测试性D、可测试性和稳定性正确答案:C7、软件的可修改性支持软件的( )。

A、可互操作性B、可维护性C、可追踪性D、有效性正确答案:B8、数据字典是软件需求分析阶段的最重要工具之一,其最基本的功能是( )A、数据通信B、数据定义C、数据维护D、数据库设计正确答案:B9、软件特性中,多个软件元素相互通讯并协同完成任务的能力指的是( )。

A、可追踪性B、可理解性C、可互操作性D、可维护性正确答案:C10、可维护性的特性中相互促进的是( )A、效率和可移植性B、可理解性和可测试性C、效率和结构好D、效率和可修改性正确答案:B11、在软件质量特性中,( )是指在规定的一段时间和条件下,与软件维持其性能水平的能力有关的一组属性。

A、可靠性B、易使用性C、正确性D、准确性正确答案:A12、设函数C(X)定义问题X的复杂程序,函数E(X)确定解决问题X 需要的工作量(时间)。

对于两个问题P1和P2,如果C(P1)>C(P2)显然E(P1)>E(P2),则得出结论E(P1+P2)>E(P1)+E(P2)就是:( )A、信息隐藏和局部化的根据B、逐步求精的根据C、抽象的根据D、模块化的根据正确答案:D13、下列说法中,不正确的是( )。

软件工程第9版部分习题答案

软件工程第9版部分习题答案

习题参考答案Exercises(Homework): P251.3 What are the four important attributes that all professional software should have? Suggest four other attributes that may sometimes be significant.Answer:Fou.importan.attribute.ar.maintainability.dependability.performanc. ability.Othe.attribute.tha.ma.b.significan.coul.b.reusabilit.(ca .i.b.reuse.i.othe.applications).distributabilit.(ca.i.b.distribute.ov wor.o.processors).portabilit.(ca.i.operat.o.multipl.platform.e. .lapto.an.mobil.platforms.an.inter-operabilit.(ca.i.wor.wit..wid.rang .o.othe.softwar.systems).Decomposition.o.th..ke.attribute.e.g.dependabilit.decompose.t.securit y.safety.availability.etc.i.als..vali.answe.t.thi.question.2.1Giving reasons for your answer based on the type of system being developed, suggest the most appropriate generic software process model that might be used as a basis for managing the development of the following systems:• A system to control anti-lock braking in a car• A virtual reality system to support software maintenance• A university accounting system that replaces an existing system • An interactive travel planning system that helps users plan journeys with the lowest environmental impactAnswer:Plan-drive.processe.ar.processe.wher.al.o.th.proces.activitie.ar.pl anne.i.advanc.an.progres.i.measure.agains.thi.plan.1.Anti-loc.brakin.syste.Thi.i..safety-critica.syste.s.require..lo.o .up-fron.analysi.befor.implementation.I.certainl.need..plan-drive.app roac.t.developmen.wit.th.requirement.carefull.analysed..waterfal.mode e.perhap.wit.forma.transfor mation.betwee.th.differen.developmen.stages.2.Virtua.realit.syste.Thi.i..syste.wher.th.requirement.wil.chang.an ponents.Incrementa.developmen. with.perhaps.som.U.prototypin.i.th.mos.appropriat.model.A.agil.proces ed.3.Universit.accountin.syste.Thi.i..syste.whos.requirement.ar.fairl. e.i.a.environmen.i.conjunctio.wit.lot.o.othe. stem.suc.a..researc.gran.managemen.system.Therefore..reuse-base. proac.i.likel.t.b.appropriat.fo.this.e.interfac.bu.whic.mus.b.stabl.an.reliable.A.incrementa.developmen.approac.i.th.mos.a e.experienc.wit.th .syste.i.gained.2.4Suggest why it is important to make a distinction between developing the user requirements and developing system requirements in the requirements engineering process.Answer:There is a fundamental difference between the user and the system requirements that mean they should be considered separately.e.requirement.ar.intende.t.describ.th.system’.function.an.f er.understan.thes.re nguag.an.ma.no.b.expresse.i.grea.detail.t.allo.som.implementatio.flexibility.Th.peopl.involve.i er’.environmen.an.applicatio.d omain.e.requirement.an .ar.intende.t.b..precis.specificatio.o.th.syste.tha.ma.b.par.o..syste e.i.situation.wher.developmen.i.outsource.an plet.specificatio.o.wha.shoul.b.developed. e.requirement.hav.bee.establi shed.Excercises(Homework): P1164.2, *4.44.2Discover ambiguities or omissions in the following statement of requirements for part of a ticket-issuing system:er.selec.thei.de stinatio.an.inpu..credi.car.an..persona.identificatio.number.e.pr esse.th.star.button..men.displa.o.potentia.destination.i.activated.al e.t.selec..destination.Onc..destinatio.ha.bee.s er.ar.requeste.t.inpu.thei.credi.card.e.i.the.requeste.t.inpu..persona.identifi er.Whe.th.credi.transactio.ha.bee.validated.th.ticke.i.issued.Answer:Ambiguities and omissions include:●• Can a customer buy several tickets for the same destination togetheror must they be bought one at a time?●• Can customers cancel a request if a mistake has been made?●• How should the system respond if an invalid card is input?●• What happens if customers try to put their card in before selectinga destination (as they would in ATM machines)?●• Must the user press the start button again if they wish to buy anotherticket to a different destination?●• Should the system only sell tickets between the station where themachine is situated and direct connections or should it include all possible destinations?4.4Write a set of non-functional requirements for the ticket-issuing system, setting out its expected reliability and response time.Answer:Possible non-functional requirements for the ticket issuing system include:1.Betwee.060.an.230.i.an.on.day.th.tota.syste.dow.tim.shoul.no.excee..minutes.2.Betwee.060.an.230.i.an.on.day.th.recover.tim.afte..syste.failur.s houl.no.excee..minutes.3.Betwee.230.an.060.i.an.on.day.th.tota.syste.dow.tim.shoul.no.excee.2.minutes.Al.thes.ar.availabilit.requirement..not.tha.thes.var.accordin.t.th. tim.o.day.Failure.whe.mos.peopl.ar.travelin.ar.les.acceptabl.tha.fail ure.whe.ther.ar.fe.customers.4.Afte.th.custome.presse..butto.o.th.machine.th.displa.shoul.b.upda te.withi.0..seconds.5.Th.ticke.issuin.tim.afte.credi.car.validatio.ha.bee.receive.shoul .no.excee.1.seconds.6.Whe.validatin.credi.cards.th.displa.shoul.provid..statu.messag.fo .customer.indicatin.tha.activit.i.takin.place.Thi.tell.th.custome.tha .th.potentiall.tim.consumin.activit.o.validatio.i.stil.i.progres.an.t ha.th.syste.ha.no.simpl.failed.7.Th.maximu.acceptabl.failur.rat.fo.ticke.issu.request.i.1.10000.Excercises(Homework): P143-1445.2, 5.5, 5.6, 5.75.2..mode.o..syste.tha.alread.exists.Explai.wh.i.i.no.alw plet.an.correct.Woul.th.sam.b.t ru.i.yo.wer.developin..mode.o..ne.system?Answer:You might create and use a model of a system that already exists for the followingreasons:1.T.understan.an.documen.th.architectur.an.operatio.o.th.existing system.2.T.ac.a.th.focu.o.discussio.abou.possibl.change.t.tha.system.r.th.re-implementatio.o.th.system.pletel.documen.t uall.t. hel.yo.wor.o.part.o.th.syste.s.onl.thes.nee.t.b.modelled.Furthermore.e.a..discussio.focus.yo.ar.unlikel.t.b.intereste.i.deta il.an.s.ca.ignor.part.o.th.syste.i.th.model.Thi.i.true.i.general.fo.model.o.ne.system.unles..model-base.approac.t plet.mode.i.required.Th.othe. plet.mode.i.whe.ther.i..contractua.re quiremen.fo.suc..mode.t.b.produce.a.par.o.th.syste.documentation.5.5Develo..sequenc.diagra.showin.th.interaction.involve.whe..studen.re gister.fo..cours.i..university.Course.ma.hav.limite.enrolment.s.th.re gistratio.proces.mus.includ.check.tha.place.ar.available.Assum.tha.th .studen.accesse.a.electroni.cours.catalo.t.fin.ou.abou.availabl.cours es.Answer:.relativel.simpl.diagra.i.al.tha.i.neede.here.I.i.bes.no.t.b.to.fuss. abou.thing.lik.UM.arro.style.a.hardl.anyon.ca.remembe.th.difference.b etwee.them.5.6Loo.carefull.a.ho.message.an.mailboxe.ar.represente.i.th.emai.syste e.i.th.syste.implementa tio.t.represen..mailbo.an.a.e-mai.message.Answer:5.7Based on your experience with a bank ATM, draw an activity diagram that models the data processing involved when a customer withdraws cash from the machine.Answer:Notice that I have not developed the activities representing other services or failed authentication.Excercises(Homework): P173-1746.1,6.3,6.96.1When describing a system, explain why you may have to design the system architecture before the requirements specification is complete.Answer:The architecture may have to be designed before specifications are written to provide a means of structuring the specification and developing different subsystem specifications concurrently, to allow manufacture of hardware by subcontractors and to provide a model for system costing.6.3Explain why design conflicts might arise when designing an architecture for which both availability and security requirements are the most important non-functional requirements.Answer:Fundamentally.t.provid.availability.yo.nee.t.hav.(po ponen.failing.yo.ca.swi ponent.Yo.als.nee.t.hav.severa.copie.o.th.d at.tha.i.bein.processed.Securit.require.minimizin.th.numbe.o.copie.o. ponen.o nl.know.a.muc.a.i.need.to.t.d.it.job.Thi.reduce.th.chanc.o.intruder.a ccessin.th.data.Therefore.ther.i..fundamenta.architectura.conflic.betwee.availabilit. (replication.severa.copies.an.securit.(specialization.minima.copies). promis.betwee.thes.fundamentall. opposin.requirements.6.9Using the basic model of an information system as presented in Figure 6.16, suggest the components that might be part of an information system thatallows users to view information about flights arriving and departing from a particular airport.Answer:rmatio.syste.an.shoul.ident ponents might be:Level 1 (Database level)Flight database; Flight status database; Airport information; Level 2: (Information retrieval level)Status management; Flight management; Search;Level 3: (User interaction level)Authentication; session management; forms processing () Level 4 (User interface)Input checking (Javascript), browserExcercises(Homework): P202-2037.1, 7.37.1in.th.structure.notatio.show.i.Figur.7.3.specif.th.weathe.statio .us.case.fo.Repor.statu.an.Reconfigure.Yo.shoul.mak.reasonabl.assumpt ion.abou.th.functionalit.tha.i.require.here.Answer:7.3in.th.UM.graphica.notatio.fo.objec.classes.desig.th.followin.obj .you.ow.experienc.t.d ecid.o.th.attribute.an.operation.tha.shoul.b.associate.wit.thes.objec ts.• a telephone• a printer for a personal computer• a personal stereo system• a bank account• a library catalogueAnswer:plexit.ca.b.adde.t.t h.objects.However..a.onl.reall.lookin.fo.simpl.object.whic.encapsulat .th.principa.requirement.o.thes.artefacts.Possibl.design.ar.show.i.th .abov.diagram.。

软件工程(第四版)习题及解答9-8

软件工程(第四版)习题及解答9-8
《软件工程》(第四版)习题参考答案
第1章
一、判断题
1× 2 √ 3× 4√ 5× 6√ 7√ 8× 9√10×
二、选择题
1-5CADDD6-10ADAAD11-15AAADA
三、简答题
1、软件包括程序、数据及其相关文档的完整集合。其中,程序是按事先设计的功能和性能要求执行的指令序列;数据是使程序能够正确地处理信息的数据结构;文档是与程序开发、维护和使用有关的图文资料。软件包括程序,程序只是软件的一部分。
1、
“学生管理系统”的顶层图案={学号+姓名+性别+年龄+专业+班级}
成绩库=学号+课程号+分数
课程库=课程号+课程名+学分
学生信息=学号+姓名+性别+年龄+专业+班级
考试成绩=学号+课程号+分数
学号=”00001”...”99999”
姓名=2{汉字}4
系统目标和范围说明书
1.项目名称:X航运公司机票预订系统。
2.背景:目前,由旅客人工到航运公司排队购票,费时、费力、管理工作量大、手续繁琐效率低,制约了公司业务的发展。
3.项目目标:建立一个网络化的机票预订系统。
4.项目范围:软件开发费用不超过X万元。
5.初步设想:建议在系统中完成安排航班、打印取票通知、打印票务账单、打印机票等主要功能。
(3)系统流程图
第3章
一、判断题
1√ 2 × 3√ 4 × 5√ 6× 7× 8√
二、选择题
1-5 BACDB 6-10 ABDAA 11-15 BABDB 16-20 ADCDB
三、简答题
1、需求分析的基本任务是要准确地理解旧系统、定义新系统的目标,为了满足用户需要,回答“系统必须做什么”的问题,即确定系统必须完成哪些工作,对新系统提出完整、准确、清晰、具体的要求。
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

1. 请从供选择的答案中选出应填入下列()中的字句。

程序的三种基本控制结构是(A2 )。

它们的共同点是(B4 )。

结构化程序设计的一种基本方法是(C4 )。

软件测试的目的是(D2 )。

软件调试的目的是(E1 )。

供选择的答案:
A. ①过程,子程序,分程序②顺序,条件,循环
③递归,堆栈,队列④调用,返回,转移
B. ①不能嵌套使用②只能用来写简单的程序
③已经用硬件实现④只有一个入口和一个出口
C. ①筛选法②递归法③归纳法④逐步求精法
D. ①证明程序中没有错误②发现程序中的错误
③测量程序的动态特性④检查程序中的语法错误
E. ①找出错误所在并改正之②排除存在错误的可能性
③对错误性质进行分类④统计出错的次数
2.从下列关于软件测试的叙述中,选出5条正确的叙述。

4 5 6 7 10
(1) 用黑盒法测试时,测试用例是根据程序内部逻辑设计的。

(2) 尽量用公共过程或子程序去代替重复的代码段。

(3) 测试是为了验证该软件已正确地实现了用户的要求。

(4) 对于连锁型分支结构,若有n个判定语句,则有2n条路径。

(5) 尽量采用复合的条件测试,以避免嵌套的分支结构。

(6) GOTO语句概念简单,使用方便,在某些情况下,保留GOTO语句反能使写出的程序更加简洁。

(7) 发现错误多的程序模块,残留在模块中的错误也多。

(8) 黑盒测试方法中最有效的是因果图法。

(9) 在做程序的单元测试时,桩(存根)模块比驱动模块容易编写。

(10) 程序效率的提高主要应通过选择高效的算法来实现。

3.从供选择的答案中选出应填入下面有关软件测试的叙述的()内的正确答案。

软件测试方法可分为黑盒测试法和白盒测试法两种。

黑盒测试法是通过分析程序的(A3 )来设计测试用例的方法。

除了测试程序外,它还适用于对(B4 )阶段的软件文档进行测试。

白盒测试法是根据程序的(C2 )来设计测试用例的方法。

除了测试程序外,它也
适用于对(D2 )阶段的软件文档进行测试。

白盒法测试程序时常按照给定的覆盖条件选取测试用例。

(E2 )覆盖比(F1 )覆盖严格,它使得每一个判定的每一条分支至少经历一次。

(G4 )覆盖既是判定覆盖,又是条件覆盖,但它并不保证使各种条件都能取到所有可能的值。

(H5 )覆盖比其他条件都要严格,但它不能保证覆盖程序中的每一条路径。

单元测试一般以(I1 )为主,测试的依据是(J 1 )。

供选择的答案:
A, C:①应用范围②内部逻辑③功能④输入数据
B, D:①编码②软件详细设计③软件总体设计④需求分析
E, F, G, H:①语句②判定③条件④判定/条件
⑤多重条件⑥路径
I:①白盒法②黑盒法
J:①模块功能规格说明②系统模块结构图③系统需求规格说明
4.从供选择的答案中选出应该填入下列关于软件测试的叙述的( )内的正确答案。

软件测试中常用的静态分析方法是(A1 )和(B5 )。

(B5 )用于检查模块或子程序间的调用是否正确。

分析方法(白盒方法)中常用的方法是(C1 )方法。

非分析方法(黑盒方法)中常用的方法是( D 2 )方法和( E )方法。

( E 3 )方法根据输出对输入的依赖关系设计测试用例。

供选择的答案:
A B:①引用分析②算法分析③可靠性分析④效率分析
⑤接口分析⑥操作分析
C ~ E:①路径测试②等价类③因果图④归纳测试
⑤综合测试⑥追踪⑦深度优先⑧调试
⑨相对图
5. 黑盒测试是从(C )观点出发的测试,白盒测试是从()观点出发的测试。

A. 开发人员、管理人员
B. 用户、管理人员
C. 用户、开发人员
D. 开发人员、用户
6. 因果图方法是根据(A )之间的因果关系来设计测试用例的。

A. 输入与输出
B. 设计与实现
C. 条件与结果
D. 主程序与子程序
7. 为了提高测试的效率,应该(C )。

A. 随机地选取测试数据
B. 取切可能的输入数据作为测试数据
C. 在完成编码以后制定软件的测试计划
D. 选择发现错误可能性大的数据作为测试数据
8. 在结构测试用例设计中,有语句覆盖、条件覆盖、判定覆盖(即分支覆盖)、路径覆盖等,其中(D )是最强的覆盖准则。

A. 语句覆盖
B. 条件覆盖
C. 判定覆盖
D. 路径覆盖
9. 使用白盒测试方法时,确定测试数据应根据(A )和指定的覆盖标准。

A. 程序的内部逻辑
B. 程序的复杂结构
C. 使用说明书
D. 程序的功能
10. (D )就是简化模拟较低层次模块功能的虚拟子程序。

A. 过程
B. 函数
C. 仿真
D. 桩
11. 在程序设计过程中,要为程序调试做好准备,主要体现在(D )。

A. 采用模块化、结构化的设计方法设计程序
B. 编写程序时要为调试提供足够的灵活性
C. 根据程序调试的需要,选择并安排适当的中间结果输出和必要的断点
D. 以上全是
12. 软件测试是软件开发过程的重要阶段,是软件质量保证的重要手段,下列(D )是软件测试的任务。

①预防软件发生错误
②发现并改正程序错误
③提供诊断错误信息
A. 只有①
B. 只有②
C. 只有③
D. 全部
13. 设计下列伪代码程序的语句覆盖和路径覆盖测试用例。

START
INPUT (A , B)
IF A > 5
THEN X := 10
ELSE X := 1
ENDIF
IF B> 10
THEN Y := 20
ELSE Y := 2
ENDIF
PRINT(X , Y)
STOP
实现路径覆盖的典型测试用例:
①2个判定表达式之值全为假
输入:A =1,B =1
预期的输出:X =1,Y =2
②2个判定表达式为假、真
输入:A =1,B =40
预期的输出:X =1,Y =20③2个判定表达式为真、假
输入:A =20,B =1
预期的输出:X =10,Y =2④2个判定表达式均为真
输入:A =20,B =40
预期的输出:X =10,Y =20。

相关文档
最新文档