【面向对象】面向对象程序设计测试题10-类的设计测试题
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
總結
以上是生活随笔為你收集整理的【面向对象】面向对象程序设计测试题10-类的设计测试题的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【数据结构与算法】哈夫曼树的Java实现
- 下一篇: 【算法分析与设计】桶排序