Test10:类的设计测试题
问题 1
类图中需要包括对象实例的定义。
答案:
错
问题 2
In a UML class diagram’s representation of a class, the top, middle, and lower rectangular compartments respectively describe the _____ of the class.
A. attributes, methods, and constants
B. name, methods, and constants
C. attributes, methods, and name
D. name, attributes, and methods
答案:
D
问题 3
在类图中,在每个类的属性区域需要定义出关联属性。
答案:
错
问题 4
在类设计的过程中,如何定义各类的方法?
所选答案:
A.找动词
B.根据类的属性定义相应的方法
C.根据与其它类的关联定义相应的方法
D.以上全是。
答案:
D
问题 5
Which of the following is true about association and aggregation in UML class diagrams?
A. Aggregation is a special form of association.
B. Association is the opposite of aggregation.
C. Association is a special form of aggregation.
D. Asso