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 Classes44 Questions
Exam 13: Operator Overloading and Templates41 Questions
Exam 14: Exception Handling43 Questions
Exam 15: Recursion43 Questions
Exam 16: Linked Lists40 Questions
Exam 17: Stacks and Queue43 Questions
Exam 18: Searching and Sorting Algorithms40 Questions
Exam 19: Binary Trees43 Questions
Exam 20: Graph Algorithms48 Questions
Exam 21: Standard Template Library41 Questions
Select questions type
If an object is declared in the definition of a member function of the class, then the object can access both the public and private members of the class.
Free
(True/False)
4.8/5
(73)
Correct Answer:
True
In C++, the ____ is called the member access operator.
Free
(Multiple Choice)
5.0/5
(73)
Correct Answer:
A
To guarantee that the member variables of a class are initialized, you use ____.
Free
(Multiple Choice)
4.7/5
(73)
Correct Answer:
C
A(n) ____________________ is a statement specifying the condition(s) that must be true before the function is called.
(Short Answer)
4.9/5
(84)
Given this declaration:myClass myObject;
The following statement is legal.
myObject.x = 10;
(True/False)
4.9/5
(73)
The public members of a class must be declared before the private members.
(True/False)
4.9/5
(78)
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.9/5
(65)
Figure 2:
-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
(84)
A(n) ____________________ function of a class changes the values of the member variable(s) of the class.
(Short Answer)
4.9/5
(70)
In C++ terminology, a class object is the same as a class instance.
(True/False)
4.9/5
(76)
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.9/5
(70)
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
(84)
The components of a class are called the ____ of the class.
(Multiple Choice)
4.9/5
(83)
-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
(88)
In C++, class is a reserved word and it defines only a data type.
(True/False)
4.8/5
(71)
If the heading of a member function of a class ends with the word const, then the function member cannot modify the private member variables, but it can modify the public member variables.
(True/False)
4.9/5
(77)
Figure 2:
-Consider the accompanying class definition, and the declaration:rectangleType bigRect; Which of the following statements is correct?
(Multiple Choice)
5.0/5
(72)
A class object can be ____.That is, it is created each time the control reaches its declaration, and destroyed when the control exits the surrounding block.
(Multiple Choice)
4.9/5
(79)
Showing 1 - 20 of 43
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)