【计算机类职业资格】计算机Java认证-异常处理、使用类及其关系及答案解析.doc

上传人:吴艺期 文档编号:1336860 上传时间:2019-10-17 格式:DOC 页数:4 大小:40KB
下载 相关 举报
【计算机类职业资格】计算机Java认证-异常处理、使用类及其关系及答案解析.doc_第1页
第1页 / 共4页
【计算机类职业资格】计算机Java认证-异常处理、使用类及其关系及答案解析.doc_第2页
第2页 / 共4页
【计算机类职业资格】计算机Java认证-异常处理、使用类及其关系及答案解析.doc_第3页
第3页 / 共4页
【计算机类职业资格】计算机Java认证-异常处理、使用类及其关系及答案解析.doc_第4页
第4页 / 共4页
亲,该文档总共4页,全部预览完了,如果喜欢就下载吧!
资源描述

1、计算机 Java认证-异常处理、使用类及其关系及答案解析(总分:12.00,做题时间:90 分钟)一、B不定项选择题/B(总题数:1,分数:12.00)Use the following code example for the next four questions:public class Client Address address;AccountNum accountNums;void setAddress(Address newAddress) address = newAddress;public Client() accountNums = new AccountNum2;acc

2、ountNums0 = new AccountNum();accountNums1 = new AccountNum();(分数:12.00)(1).In the preceding code segment, what is the relationship of the Client object and the address variable? A. Direct association B. Temporary association C. Composition association D. Aggregation association(分数:2.40)A.B.C.D.(2).I

3、n the preceding code segment, what is the relationship of the Client object and the accountNums variable? A. Direct association B. Temporary association C. Composition association D. Aggregation association(分数:2.40)A.B.C.D.(3).In the preceding code segment, what is the multiplicity between the Clien

4、t object and the address variable? A. One-to-one B. One-to-many C. Many-to-many(分数:2.40)A.B.C.D.(4).In the preceding code segment, what is the multiplicity between the Client object and the accountNums variable? A. One-to-one B. One-to-many C. Many-to-many(分数:2.40)A.B.C.D.(5).Which of the following

5、statements are true? (Choose all that apply.) A. Association navigation can be quad-directional. B. Association navigation can be bidirectional. C. Association navigation can have no direction. D. Association navigation can be unidirectional.(分数:2.40)A.B.C.D.计算机 Java认证-异常处理、使用类及其关系答案解析(总分:12.00,做题时间

6、:90 分钟)一、B不定项选择题/B(总题数:1,分数:12.00)Use the following code example for the next four questions:public class Client Address address;AccountNum accountNums;void setAddress(Address newAddress) address = newAddress;public Client() accountNums = new AccountNum2;accountNums0 = new AccountNum();accountNums1

7、= new AccountNum();(分数:12.00)(1).In the preceding code segment, what is the relationship of the Client object and the address variable? A. Direct association B. Temporary association C. Composition association D. Aggregation association(分数:2.40)A. B.C.D.解析:直接关联是最佳答案,因为从逻辑上来说,一个 Client对象有一个(“has an”)

8、Address 对象。B、C 和 D不正确。(2).In the preceding code segment, what is the relationship of the Client object and the accountNums variable? A. Direct association B. Temporary association C. Composition association D. Aggregation association(分数:2.40)A.B.C. D.解析:这是一个组合关联,因为 Client对象由 AccountNum对象“组成”。这是一种强关系

9、,因为Client对象维护 AccountNumber对象的生命周期。A、B 和 D不正确。(3).In the preceding code segment, what is the multiplicity between the Client object and the address variable? A. One-to-one B. One-to-many C. Many-to-many(分数:2.40)A. B.C.D.解析:因为没有数组或者集合涉及 Client对象或者 Address对象中的一个,这必须是一对一关系。B 和C不正确。B 不正确,因为 address变量是单个

10、变量,因此不满足多个。C 不正确,因为 Client对象和address变量两者都不能认为是多个,因为它们都只有一个。(4).In the preceding code segment, what is the multiplicity between the Client object and the accountNums variable? A. One-to-one B. One-to-many C. Many-to-many(分数:2.40)A.B. C.D.解析:AccountNumber 对象数组应该是一对多的产物。A 和 C不正确。A 不正确,因为 accountNums变量是

11、一个数组,因此必须是多个。C 不正确,因为只有一个 Client对象。(5).Which of the following statements are true? (Choose all that apply.) A. Association navigation can be quad-directional. B. Association navigation can be bidirectional. C. Association navigation can have no direction. D. Association navigation can be unidirectional.(分数:2.40)A.B. C.D. 解析:关系只能是单向的或者双向的。A 和 C不正确。A 不正确,因为不存在 4个方向的关系。B 不正确,因为不可能有一种关系没有方向。

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 考试资料 > 职业资格

copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
备案/许可证编号:苏ICP备17064731号-1