Exam 7: Using Classes

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

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)

ADT stands for ____________________.

(Essay)
4.9/5
(37)

Should static fields always be constant? Explain your answer.

(Essay)
4.9/5
(40)

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:
Verified
Premises:
Responses:
holds the memory address of the current object that is using a class function
polymorphism
(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 ____ operator is the pointer-to-member operator.

(Multiple Choice)
4.8/5
(35)

Static functions ____ access non-static variables.

(Multiple Choice)
4.7/5
(36)

You ____ assign a value to a field in a class definition.

(Multiple Choice)
4.8/5
(37)

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)

The value of a static field cannot be changed.

(True/False)
4.9/5
(32)

____________________ 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:
Verified
Premises:
Responses:
looks like an arrow
pointer-to-member operator
(Matching)
4.9/5
(34)

To ____ an object is to declare or create it.

(Multiple Choice)
4.8/5
(36)

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:
Verified
Premises:
Responses:
assigns accessibility to the declared variables that follow it
abstract data type
(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:
Verified
Premises:
Responses:
field that does not belong to a specific object
pointer-to-member operator
(Matching)
4.8/5
(30)
Showing 21 - 40 of 56
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)