1 《中山大学授予学士学位工作细则》第六条***不授予学士学位计算机科学系 2014 学年度第二学期《程序设计 II 》期末考试试题(B) 任课教师: 吴维刚刘聪考试形式: 闭卷考试时间:2小时年级: 班别: 专业: 姓名: _____ 学号: _ 成绩 1. Single Choice (20points) Please choose the choice that pletes the statements in the question 1) Which of the following statements about object-oriented programming (OOP) is NOT correct ? A) The key idea of OOP is to build programs using software object . B) OOP offers many advantages: simplicity, modularity, modifiability, and soon. C) OOP is more efficient than POP in terms of programming productivity. D) An object-oriented program can run faster than a procedure-oriented program with the same functionality. 2) Which of the following statements about static data members is NOT correct? A)A static data member can initialized at declaration . B)A static data member refers toa member whose value cannot be changed after initialized. C) We may access static data members without before any object created. D)A static data member is shared by objects of the same class. 3) Which of the following variables cannot bea member of class A? A)A*p B)Aa C)A&r D) string s 4) Which of the following statement s isnot a character istic ofa constructor? A) The name ofa constructor must be the same as the class. B)A constructor can be overloaded. C) The parameters of constructor may have default values. D)The return type ofa constructor must be "void" . 5) IfC isa class name, how many times is the constructor ofC called in "C a, b[2], *p[2]; "? A)2 B)3 C)4 D)5 6) Ifp isa pointer to an object with a member function x (), which of the following access tox () is correct? A)* B) p->x () C) *p-> x () D)* () 警示 2 7) Which of the following is NOT a member function ofa class ? A) constructor B) destructor C) friend function D) copy constructor 8) If class X is declared tobe the friend ofa class Y, then which of the following statements is correct? A)Y can access the protected members of X. B)X can access the private members ofY. C) If class Z is declared tobe