Exam 10: Classes and Data Abstraction
Exam 1: An Overview of Computers and Programming Languages50 Questions
Exam 2: Basic Elements of C++50 Questions
Exam 3: Input/Output50 Questions
Exam 4: Control Structures I (Selection)50 Questions
Exam 5: Control Structures II (Repetition)50 Questions
Exam 6: User-Defined Functions50 Questions
Exam 7: User-Defined Simple Data Types, Namespaces, and the string Type50 Questions
Exam 8: Arrays and Strings50 Questions
Exam 9: Records (structs)50 Questions
Exam 10: Classes and Data Abstraction50 Questions
Exam 11: Inheritance and Composition50 Questions
Exam 12: Pointers, Classes, Virtual Functions, Abstract Classes, and Lists50 Questions
Exam 13: Overloading and Templates50 Questions
Exam 14: Exception Handling50 Questions
Exam 15: Recursion50 Questions
Exam 16: Linked Lists50 Questions
Exam 17: Stacks and Queues50 Questions
Exam 18: Searching and Sorting Algorithms50 Questions
Exam 19: Binary Trees50 Questions
Exam 20: Graphs50 Questions
Exam 21: Standard Template Library (STL)50 Questions
Select questions type
The components of a class are called the ____ of the class.
(Multiple Choice)
4.8/5
(26)
A(n)____________________ is a statement specifying the condition(s)that must be true before the function is called.
(Short Answer)
4.9/5
(30)
To create the object code file for any source code file,the command line option ____________________ is used on the system command line.
(Short Answer)
4.8/5
(25)
You can use arithmetic operators to perform arithmetic operations on class objects.
(True/False)
4.7/5
(37)
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
(32)
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.8/5
(35)
Figure 2:
class rectangleType
{
public:
void setLengthWidth(double x, double y);
//Postcondition: length = x; width = y;
void print() const;
//Output length and width;
double area();
//Calculate and return the area of the rectangle;
double perimeter();
//Calculate and return the parameter;
rectangleType();
//Postcondition: length = 0; width = 0;
rectangleType(double x, double y);
//Postcondition: length = x; width = y;
private:
double length;
double width;
};
-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
(47)
-Consider the accompanying class and member functions definitions in Figure 3.How many constructors are present in the class definition above?


(Multiple Choice)
4.8/5
(32)
To guarantee that the member variables of a class are initialized,you use ____.
(Multiple Choice)
4.9/5
(36)
Figure 1:
-The word ____ at the end of the member functions in the accompanying class clockType in Figure 1 specifies that these functions cannot modify the member variables of a clockType object.

(Multiple Choice)
4.8/5
(31)
Showing 41 - 50 of 50
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)