Exam 2: Object-Oriented Design OOD and C++

arrow
  • Select Tags
search iconSearch Question
  • Select Tags

Default arguments can be used with an overloaded operator.

Free
(True/False)
4.8/5
(37)
Correct Answer:
Verified

False

If a class contains the default constructor and no values are specified when the object is declared, the ____ executes and initializes the object.

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

D

Composition is a(n) "____" relationship.

Free
(Multiple Choice)
4.7/5
(44)
Correct Answer:
Verified

B

To define new classes, you create new ____ files.

(Multiple Choice)
4.8/5
(38)

The derived class can redefine public member functions of a base class.

(True/False)
4.9/5
(39)

By using templates, you can write a single code segment for a set of related functions.

(True/False)
5.0/5
(36)

The arguments to the constructor of a member object are specified in the ____ part of the definition of the constructor of the class.

(Multiple Choice)
4.7/5
(42)

Passing parameters to a function has an effect at ____ time.

(Multiple Choice)
4.9/5
(41)

A class cannot have a constructor with default parameters.

(True/False)
4.9/5
(41)

A friend function is a member function of a class but only has access to the class's public data members.

(True/False)
4.8/5
(30)

For a base class to give access to a member to its derived class and still prevent its direct access outside the class, you must declare that member under the member access specifier ____.

(Multiple Choice)
4.8/5
(41)

Private members of a base class can be accessed by a derived class.

(True/False)
4.9/5
(48)

In ____, one or more members of a class are objects of another class type.

(Multiple Choice)
4.7/5
(25)

A(n) ____ typically serves to initialize the member variables of a derived class.

(Multiple Choice)
4.9/5
(35)

When you declare a derived class object, this object inherits the members of the base class, but the derived class object cannot directly access the ____.

(Multiple Choice)
4.7/5
(35)

We need to ensure that the private member variables that are inherited from the base class are initialized when a ____ of the derived class executes.

(Multiple Choice)
4.9/5
(44)

If there are three classes, shape, circle, and square, what is the most likely relationship among them?

(Multiple Choice)
4.7/5
(33)

The definitions of member functions can be placed in a separate file whose extension is ____.

(Multiple Choice)
4.9/5
(39)

In single inheritance, the derived class is derived from a single base class.

(True/False)
4.9/5
(40)

The function that overloads any of the operators (), [], ->, or = for a class must be declared as a member of the class.

(True/False)
4.8/5
(34)
Showing 1 - 20 of 35
close modal

Filters

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