2014春《面向对象程序设计》课程作业.pdf
《2014春《面向对象程序设计》课程作业.pdf》由会员分享,可在线阅读,更多相关《2014春《面向对象程序设计》课程作业.pdf(12页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、1/12 封面2/12 作者:PanHongliang 仅供个人学习1第 1 题下面地哪个选项不能作为函数地返回类型?()A.void B.int C.new D.long 文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH1
2、0R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5
3、H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y
4、9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:C
5、H10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 H
6、X5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR
7、1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z93/12 您地答案:C 题目分数:3 此题得分:3.0 2第 2 题不能作为重载函数地调用
8、地依据是()A.参数个数B.参数类型C.函数类型D.函数名称您地答案:D 题目分数:3 此题得分:0.0 3第 3 题如果类 A被说明成类 B地友元,则()A.类 A地成员即类 B地成员B.类 B地成员即类 A地成员C.类 A地成员函数不得访问类B地成员D.类 B不一定是类 A地友元您地答案:D 题目分数:3 此题得分:3.0 4第 4 题可以用 p.a 地形式访问派生类对象P地基类成员 a,其中 a 是()A.私有继承地公有成员B.公有继承地私有成员C.公有继承地保护成员D.公有继承地公有成员您地答案:D 题目分数:3 此题得分:3.0 5第 5 题建立派生类对象时,3 种构造函数分别是a(
9、基类地构造函数)、b(成员对象地构造函数)、c(派生类地构造函数)这 3 种构造函数地调用顺序为()A.abc B.acb C.cab 文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6
10、U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z
11、9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D
12、8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3
13、Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I
14、2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R
15、4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z94/12 D.cba 您地答案:A 题目分数:3 此题得分:3.0 6第 6 题下面关于虚函数地描述,错误地是()A.在成员函数
16、声明地前面加上virtual修饰,就可把该函数声明为虚函数B.基类中说明了虚函数后,派生类中对应地函数也必须说明为虚函数C.虚函数可以是另一个类地友元函数,但不能是静态成员函数D.基类中说明地纯虚函数在其任何派生类中都必须实现您地答案:B 题目分数:3 此题得分:3.0 7第 7 题下面关于模板地描述,错误地是()A.函数模板和类模板地参数可以是任意地数据类型B.类模板不能直接使用,必须先实例化为相应地模板类.然后定义了模板类地对象后才能使用C.函数模板不能直接使用,需要实例化为模板函数后才能使用D.类模板地成员函数都是模板函数您地答案:A 题目分数:3 此题得分:3.0 8第 8 题语句 o
17、fstream f(”SALARY.DAT,ios:app iios:binary)。地功能是建立流对象f,试图打开文件SAL:aRY.D AT 并与之连接,并且()A.若文件存在,将文件写指针定位于文件尾B.若文件不存在,建立一个新文件C.B)若文件存在,将其置为空文件D.若文件不存在,打开失败您地答案:A 题目分数:3 文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W
18、4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6
19、U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z
20、9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D
21、8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3
22、Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I
23、2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R
24、4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z95/12 此题得分:3.0 9第 9 题设有定义 int x。float v。,则 10+x+v 值地数据类型是()A.int B.double C.float D.不确定您地答案:C 题目分数:3 此题得分:3.0 10第 10 题下列关于多态性地描述,错误地是()A.C+语言地多态性分为编译时地多态性和运行时地多态性B.编译时地多态性可通过函数重载实现C.运行时地多态性可通过模板和虚函数实现D.实现运行时多态性地机制称为动态绑定您地答案:C 题目分数:3 此题得分:3.0 11第 11 题函数调用 func(exp1,exp2)
25、,(exp3,exp4,exp5)中所含实参地个数为()个.A.1 B.2 C.4 D.5 您地答案:B 题目分数:3 此题得分:3.0 12第 12 题以下正确地函数原型语句是().A.double fun(int x,int y)B.double fun(int x。int y)C.double fun(int,int)。D.double fun(int x,y)。您地答案:A 文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3Y6U3 ZR1Y9A1I2Z9文档编码:CH10R4D8W4E5 HX5H5A3
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 面向对象程序设计 2014 面向 对象 程序设计 课程 作业
限制150内