Filters
Question type

Study Flashcards

A ____ class member exists, even when you have not instantiated any objects of the class.


A) public
B) private
C) static
D) const

E) A) and B)
F) C) and D)

Correct Answer

verifed

verified

To ____ an object is to declare or create it.


A) instantiate
B) encapsulate
C) abstract
D) overload

E) None of the above
F) C) and D)

Correct Answer

verifed

verified

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
implementation section
interface
class variable
polymorphism
access modifier
abstract data type

Correct Answer

pointer-to-member operator
class
this pointer
implementation section
interface
class variable
polymorphism
access modifier
abstract data type

ADT stands for ____________________.

Correct Answer

verifed

verified

The value of a static field cannot be changed.

A) True
B) False

Correct Answer

verifed

verified

The ____ operator is the pointer-to-member operator.


A) ::
B) &
C) *
D) ->

E) A) and C)
F) B) and D)

Correct Answer

verifed

verified

The ____ pointer is automatically supplied every time you call a non-static member function of a class.


A) this
B) super
C) const
D) void

E) A) and B)
F) A) and C)

Correct Answer

verifed

verified

Should static fields always be constant? Explain your answer.

Correct Answer

verifed

verified

Although static fields are frequently co...

View Answer

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


A) can
B) cannot
C) should
D) should not

E) All of the above
F) B) and C)

Correct Answer

verifed

verified

Match each term with the correct statement below.

Premises
looks like an arrow
Responses
pointer-to-member operator
class
implementation section
polymorphism
class variable
abstract data type
interface
access modifier
this pointer

Correct Answer

pointer-to-member operator
class
implementation section
polymorphism
class variable
abstract data type
interface
access modifier
this pointer

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
implementation section
this pointer
polymorphism
class variable
access modifier
interface

Correct Answer

abstract data type
class
pointer-to-member operator
implementation section
this pointer
polymorphism
class variable
access modifier
interface

To use the function displayStudentData() of the object aSophmore that belongs to the class Student , the correct syntax is ____.


A) aSophmore.displayStudentData() ;
B) Student.displayStudentData() ;
C) aSophmore::displayStudentData() ;
D) *aSophmore.displayStudentData() ;

E) A) and C)
F) All of the above

Correct Answer

verifed

verified

The variable ____ is an example of a correct use of the this pointer.


A) *this.employeeIdNum
B) (*this) .employeeIdNum
C) *(this.employeeIdNum)
D) *(this) .employeeIdNum

E) A) and C)
F) None of the above

Correct Answer

verifed

verified

Programmers sometimes refer to ____ as an example of using a "black box."


A) polymorphism
B) encapsulation
C) instantiation
D) abstraction

E) A) and D)
F) A) and B)

Correct Answer

verifed

verified

____________________ variables belong to the class, and you can use them even if you never instantiate an object.

Correct Answer

verifed

verified

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.


A) scope resolution
B) conditional
C) dot
D) address

E) B) and C)
F) C) and D)

Correct Answer

verifed

verified

Conventionally, class names begin with a(n) ____________________ letter.

Correct Answer

verifed

verified

Consider the function shown below: void Customer::setBalance(double balance) { Customer::balance = balance; } Why is the scope resolution operator needed within the function body?

Correct Answer

verifed

verified

Within this function, any use of balance...

View Answer

Static functions ____ access non-static variables.


A) can
B) cannot
C) should
D) should not

E) B) and C)
F) A) and D)

Correct Answer

verifed

verified

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
access modifier
this pointer
class
abstract data type
interface
implementation section

Correct Answer

polymorphism
pointer-to-member operator
class variable
access modifier
this pointer
class
abstract data type
interface
implementation section

Showing 21 - 40 of 56

Related Exams

Show Answer