Exam 10: Classes and Data Abstraction
Exam 1: An Overview of Computers and Programming Languages40 Questions
Exam 2: Basic Elements of C++50 Questions
Exam 3: Inputoutput40 Questions
Exam 4: Control Structures I Selection40 Questions
Exam 5: Control Structures II Repetition40 Questions
Exam 6: User-Defined Function41 Questions
Exam 7: Namespaces, the Class String, and User-Defined Simple Data Types40 Questions
Exam 8: Arrays40 Questions
Exam 9: Records Structs40 Questions
Exam 10: Classes and Data Abstraction43 Questions
Exam 11: Inheritance and Composition41 Questions
Exam 12: Pointers, Classes, Virtual Functions, and Abstract Classes43 Questions
Exam 13: Overloading and Templates41 Questions
Exam 14: Exception Handling42 Questions
Exam 15: Recursion41 Questions
Exam 16: Searching and Sorting46 Questions
Exam 17: Linked Lists41 Questions
Exam 18: Stacks and Queues42 Questions
Select questions type
A ____ sign in front of a member name on a UML diagram indicates that this member is a public member.
(Multiple Choice)
4.8/5
(41)
A class object can be ____. That is, it can be created once, when the control reaches its declaration, and destroyed when the program terminates.
(Multiple Choice)
4.8/5
(35)
A(n) ____________________ function of a class changes the values of the member variable(s) of the class.
(Short Answer)
4.8/5
(41)
With ____________________ functions, the definitions of the member functions are placed in the implementations file.
(Short Answer)
4.9/5
(34)
-Consider the UML class diagram shown in the accompanying figure. Which of the following is the name of the class?

(Multiple Choice)
4.9/5
(33)
Given this declaration:
class myClass
{
public:
void print(); //Output the value of x;
MyClass();
private:
int x;
};
myClass myObject;
The following statement is legal.
myObject.x = 10;
(True/False)
4.8/5
(43)
In C++, you can pass a variable by reference and still prevent the function from changing its value by using the keyword ____ in the formal parameter declaration.
(Multiple Choice)
4.7/5
(34)
In C++ terminology, a class object is the same as a class instance.
(True/False)
4.8/5
(30)
A program or software that uses and manipulates the objects of a class is called a(n) ____________________ of that class.
(Short Answer)
4.8/5
(37)
A ____ sign in front of a member name on a UML diagram indicates that this member is a protected member.
(Multiple Choice)
4.9/5
(33)
-Consider the accompanying class definition. Which of the following variable declarations is correct?

(Multiple Choice)
4.8/5
(37)
A member function of a class that only accesses the value(s) of the data member(s) is called a(n) ____ function.
(Multiple Choice)
4.7/5
(49)
If a member of a class is ____, you cannot access it outside the class.
(Multiple Choice)
4.8/5
(26)
If a function of a class is static, it is declared in the class definition using the keyword static in its ____.
(Multiple Choice)
4.9/5
(37)
If a class object is passed by ____________________, the contents of the member variables of the actual parameter are copied into the corresponding member variables of the formal parameter.
(Short Answer)
4.9/5
(49)
If an object is created in a user program, then the object can access both the public and private members of the class.
(True/False)
4.8/5
(28)
-Consider the accompanying class definition, and the object declaration: rectangleType bigRect(14,10);
Which of the following statements is correct?

(Multiple Choice)
4.9/5
(50)
Showing 21 - 40 of 43
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)