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
Consider the function shown below:
void Customer::setBalance(double balance)
{
Customer::balance = balance;
}
Why is the scope resolution operator needed within the function body?
(Essay)
4.8/5
(34)
To use the function displayStudentData() of the object aSophmore that belongs to the class Student , the correct syntax is ____.
(Multiple Choice)
4.8/5
(40)
Match each term with the correct statement below.
Premises:
holds the memory address of the current object that is using a class function
Responses:
polymorphism
pointer-to-member operator
class variable
Correct Answer:
Premises:
Responses:
(Matching)
4.8/5
(41)
The variable ____ is an example of a correct use of the this pointer.
(Multiple Choice)
4.8/5
(36)
The ____ pointer is automatically supplied every time you call a non-static member function of a class.
(Multiple Choice)
4.8/5
(37)
When you use an object, the ____ operator, and a non-static function of the object's class, you actually pass the specific object's address to the function as an unseen argument.
(Multiple Choice)
4.8/5
(34)
____________________ variables belong to the class, and you can use them even if you never instantiate an object.
(Short Answer)
5.0/5
(41)
Match each term with the correct statement below.
Premises:
looks like an arrow
Responses:
pointer-to-member operator
class
implementation section
Correct Answer:
Premises:
Responses:
(Matching)
4.9/5
(34)
Conventionally, class names begin with a(n) ____________________ letter.
(Short Answer)
4.9/5
(45)
A ____ class member exists, even when you have not instantiated any objects of the class.
(Multiple Choice)
5.0/5
(45)
Match each term with the correct statement below.
Premises:
assigns accessibility to the declared variables that follow it
Responses:
abstract data type
class
pointer-to-member operator
Correct Answer:
Premises:
Responses:
(Matching)
4.9/5
(44)
Programmers sometimes refer to ____ as an example of using a "black box."
(Multiple Choice)
4.8/5
(37)
Match each term with the correct statement below.
Premises:
field that does not belong to a specific object
Responses:
pointer-to-member operator
class
this pointer
Correct Answer:
Premises:
Responses:
(Matching)
4.8/5
(30)
Showing 21 - 40 of 56
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)