Exam 12: Adding Functionality to Your Classes

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

Assigning a floating-point value to an integer variable is an example of a(n) ____ conversion.

Free
(Multiple Choice)
4.9/5
(38)
Correct Answer:
Verified

A

Including a declaration for the second class before the first class s definition is formally called a(n) ____.

Free
(Multiple Choice)
4.8/5
(37)
Correct Answer:
Verified

B

C++ requires declaring static variables in the class ____________________ section.

Free
(Short Answer)
4.7/5
(33)
Correct Answer:
Verified

declaration

Inheritance allows redefining how member functions of related classes operate based on the class object being referenced.

(True/False)
4.9/5
(37)

Class member functions are global in the file where they re defined but can be called only for objects created from the class.

(True/False)
4.9/5
(33)

The cout stream object s insertion operator function can be ____________________ to process user-defined class objects.

(Short Answer)
4.8/5
(41)

A derived class object can be assigned to a base class object.

(True/False)
4.8/5
(46)

In this statement: double RoomDimension::TotalSqFootage = 0.0; TotalSqFootage is a(n) ____.

(Multiple Choice)
4.8/5
(41)

Static member ____ can only access static data members and other static member ____ of the class.

(Multiple Choice)
4.9/5
(43)

Conversion from a built-in type to a class type is made using a(n) ____ constructor.

(Multiple Choice)
5.0/5
(37)

Overriding a base member function by using an overloaded derived member function is an example of ____.

(Multiple Choice)
4.9/5
(35)

You cannot create static member functions in C++.

(True/False)
5.0/5
(36)

Because a(n) ____________________ function can be called explicitly after all objects have been declared, it can be used as a cast independent of its initialization purpose.

(Short Answer)
4.7/5
(33)

In a(n) ____ language, data and operations can be incorporated together in such a way that data values can be isolated and accessed through the specified class functions, but inheritance is not required.

(Multiple Choice)
4.8/5
(35)

Basing function selection on the object making the call is the classic definition of ____ behavior.

(Multiple Choice)
4.8/5
(35)

____ is the capability of deriving one class from another class.

(Multiple Choice)
4.7/5
(35)

A conversion operator function uses the name of a(n) ____.

(Multiple Choice)
4.7/5
(37)

Dynamic binding determines which function should be called at runtime, based on the ____ type making the call.

(Multiple Choice)
5.0/5
(40)

The first line of the declaration section of a derived class must include an access specifier and a(n) ____________________ class name.

(Short Answer)
4.8/5
(35)

____________________ access permits access only to member or friend functions, and allows any derived class to inherit this restriction.

(Short Answer)
4.7/5
(39)
Showing 1 - 20 of 50
close modal

Filters

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