Exam 10: Classes and Objects: A Deeper Look

arrow

5,815 students have unlocked this exam

  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

Only the first constructor for a class is defined without a return value.Subsequent constructors have the return type void.

(True/False)
4.9/5
(29)

Instance variables declared readonly do not or cannot:

(Multiple Choice)
4.8/5
(31)

Programmers should not take into consideration that their code will be modified.

(True/False)
4.8/5
(40)

The data components of a class are called instance variables.

(True/False)
4.8/5
(41)

Which statement is false

(Multiple Choice)
4.8/5
(28)

Composition:

(Multiple Choice)
4.7/5
(32)

Keyword is used for constants whose values cannot be determined at compile time.

(Multiple Choice)
4.8/5
(23)

An object of a class that has a reference to another object of the same class may access all the private data and methods of that class.

(True/False)
4.8/5
(35)

A destructor has the same name as the class and its constructor.

(True/False)
4.9/5
(35)

Which of the following describes a static variable

(Multiple Choice)
4.8/5
(26)

The purpose of utility methods is to support the operation of a class' other methods.

(True/False)
4.8/5
(37)

A static variable represents class-wide information.

(True/False)
4.7/5
(33)

At least one argument of an operator overload method must be a reference to an object of the class in which the operator is overloaded.

(True/False)
4.9/5
(44)

Objects can hide their implementation from other objects.

(True/False)
4.9/5
(45)

Only certain objects have a this reference.

(True/False)
4.8/5
(36)

Every class inherits directly or indirectly from class _________.

(Multiple Choice)
4.9/5
(37)

A program contains a separate copy of a static variable for each object that's instantiated.

(True/False)
4.9/5
(34)

Attempting to modify a readonly instance variable after it's initialized is a fatal execution-time error.

(True/False)
4.9/5
(38)

Operator overloading is the process of:

(Multiple Choice)
4.8/5
(42)

A can be defined in a class to perform termination housekeeping on an object before the garbage collector reclaims the object's memory.

(Multiple Choice)
4.9/5
(31)
Showing 21 - 40 of 79
close modal

Filters

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