【软件工程习题答案】第四章 面向对象范型

第四章 单元测试

1单选(5分)
In good design, modules should have ________.
在良好的设计中,模块应该有 B
A.low coupling and low cohesion
B.low coupling and high cohesion
C.high coupling and low cohesion
D.high coupling and high cohesion

2单选(5分)
Which of the following cannot be taken as a module________
以下哪项不能作为模块strong>D
A.class
B.function
C.method
D.collection

3单选(5分)
Which of the following statements about module is wrong_________
关于模块的以下语句中哪个是错误的strong>C
A.Good module design is important for the quality of the whole software system.
B.Modules are parts of the whole software system.
C.An array in a program can be taken as a module.
D.Module design is part of software system design.

4单选(5分)
_____is to encapsulate the attributes and operations in an object, and hides the internal details of an object as possible. _
____是为了在一个对象中封装属性和操作,并尽可能隐藏对象的内部细节。C
A.Message
B.Polymorphism
C.Data encapsulation
D.Inheritance

5单选(5分)
Which of the following statements is not correct________
下列哪个语句是不正确的strong>D
A.Data encapsulation is a feature of object-oriented paradigm.
B.Class is a kind of abstract data type.
C.Information hiding is a feature of object-oriented paradigm.
D.Encapsulation and information hiding mean that all the components in an object will be totally invisible from outside.

6单选(5分)
Every class engaged in a relationship should have a multiplicity except _______.
除_______关系外,每一个参与关系的类都有多重性。B
A.none of the above
B.inheritance
C.association
D.aggregation

7单选(5分)
A verb or a verb phrase must be used to describe the relationship between two classes with _______.
描述两类之间的_______关系时,必须使用一个动词或动词短语。D
A.inheritance
B.aggregation
C.composition
D.association

8单选(5分)
Which of the following statements is true______
下列哪个语句是正确的strong>D
A.An arm is a part of a HumanBeing, so it is a subclass of class HumanBeing.
B.Course “Software Engineering” is a subclass of class “Course”.
C.If we code properly, we can get inheritance with structural programming languages.
D.Inheritance brings us both advantages and troubles if it is not adopted properly.

9单选(5分)
UML is an abbreviation of __________.
UML是__________的缩写。A
A.Unified Modeling Language
B.Universal Module Language
C.Unified Module Language
D.United Modeling Language

10单选(5分)
Which of the following statements is wrong________
下列哪个语句是不正确的strong>C
A.The classical/procedural paradigm is inferior to the object-oriented paradigm.
B.An object is an instance of abstract data type.
C.Operation-oriented technique primarily considers both the operations and the data of the product.
D.In all object-oriented technique, data and operations are considered of the same importance; neither takes precedence over the other.

11单选(5分)
Invoking the correct method to be done at run time (dynamically) and not at compile time (statically), the act of connecting an object to the appropriate method is termed _________.
调用正确的方法是在运行时完成(动态)而不是在编译时(静态),将对象连接到适当方法的这种行为称为 A
A.dynamic binding
B.inheritance
C.data coupling
D.polymorphism

12单选(5分)
Which of the following is not a UML diagram__________
下列哪一个不是UML图strong>B
A.User case diagram.
B.ER diagram.
C.Sequence diagram.
D.Class diagram

13单选(5分)
A ________ is a lexically contiguous sequence of program statements, bounded by boundary elements, with an aggregate identifier.
________是由边界元素限定的具有聚合标识符的程序语句的词法连续序列 B
A.document
B.module
C.project
D.system

14单选(5分)
Two modules are ________ coupled if one passes an element of control to the other.
如果一个控制元素传递给另一个,两个模块是________耦合。B
A.data
B.control
C.logical
D.stamp

15单选(5分)
Two modules are ______ coupled if a data structure is passed as a parameter, but the called module operates on some but not all of the individual components of the data structure.
如果将数据结构作为参数传递,但被调用模块对数据结构的一些但不是所有组件进行操作,则两个模块______耦合。A
A.stamp
B.logical
C.data
D.control

16单选(5分)
Two modules are ______ coupled if one directly references contents of the other.
如果一个直接引用另一个的内容,两个模块______耦合。D
A.common
B.data
C.stamp
D.content

17单选(5分)
Which of the following statements is not correctbr> 下列哪个语句是不正确的strong>B
A.A class is an abstract data type.
B.An abstract data type is just a class.
C.Information hiding can be used to obviate common coupling.
D.Abstract data type supports data abstraction.

18单选(5分)
The relationship between whole-class and part-classes is called ______.
整体和部分类之间的关系被称为 D
A.inheritance
B.coupling
C.association
D.aggregation

19单选(5分)
Which of the following statements is not correct__________
下列哪个语句是不正确的strong>C
A.Association between two classes cannot be implemented with “extends” in Java.
B.In a library management system, the relationship between class Borrower and Book is “borrows/returns”.
C.Head is a part of eGame-HumanBeing, so the relationship between Head and eGame-HumanBeing is association.
D.Association should be described with a domain-related strong verb or verb phrase.

声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!

上一篇 2020年4月23日
下一篇 2020年4月23日

相关推荐