Exam 7: Using Classes
Exam 1: An Overview of Object-Oriented Programming and C++55 Questions
Exam 2: Evaluating C Expressions51 Questions
Exam 3: Making Decisions50 Questions
Exam 4: Performing Loops51 Questions
Exam 5: Understanding Arrays, Strings and Pointers55 Questions
Exam 6: Using C++ Functions51 Questions
Exam 7: Using Classes56 Questions
Exam 8: Class Features and Design Issues53 Questions
Exam 9: Understanding Friends and Overloading Operators52 Questions
Exam 10: Understanding Inheritance53 Questions
Exam 11: Using Templates54 Questions
Exam 12: Handling Exceptions51 Questions
Exam 13: Advanced Input and Output55 Questions
Exam 14: Advanced Topics53 Questions
Select questions type
When a class field is ____, only one memory location is allocated, no matter how many objects of the class you instantiate.
(Multiple Choice)
4.9/5
(45)
A function that is a user of your class is a class ____________________.
(Short Answer)
4.9/5
(35)
The access modifier ____ means a class member cannot be accessed using any statements in any functions that are not also part of the class.
(Multiple Choice)
4.9/5
(40)
Conventionally, object names begin with a(n) ____________________ letter.
(Short Answer)
4.9/5
(39)
When you do not want to declare an object, you can still access a static , class-wide field by using a function that is ____.
(Multiple Choice)
4.9/5
(41)
You must use both the class name and the ____ operator when you implement a member function, because they tie the function to the class and allow every instantiated object to use the function name.
(Multiple Choice)
4.9/5
(36)
The ______________________________ is constructed by using a dash followed by a right-angle bracket (or greater-than sign).
(Essay)
4.8/5
(30)
Match each term with the correct statement below.
Premises:
contains the functions of a class
Responses:
class variable
this pointer
pointer-to-member operator
Correct Answer:
Premises:
Responses:
(Matching)
4.8/5
(36)
Consider the following class:
class Student
{
private:
int idNum;
string lastName;
double gradePointAverage;
};
Add a public function void displayStudentData() to the class definition and then write an implementation for the function.
(Essay)
4.9/5
(37)
Write a class declaration that has three private fields and three functions that can be used to assign values to each of the data fields of the class. Write the implementation of one of the functions.
(Essay)
4.8/5
(40)
____ variables are sometimes called class variables, class fields, or class-wide fields.
(Multiple Choice)
4.9/5
(29)
The ____ section of a class contains the class name, variables (attributes), and function prototypes.
(Multiple Choice)
4.9/5
(36)
Showing 41 - 56 of 56
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)