Exam 4: Inheritance and Class Hierarchies

arrow
  • Select Tags
search iconSearch Question
  • Select Tags

Having multiple member functions with the same name but different signatures in a class is called member function __________.

Free
(Short Answer)
5.0/5
(28)
Correct Answer:
Verified

overloading

__________ are used to group collections of declarations into a functional unit.

Free
(Short Answer)
4.8/5
(27)
Correct Answer:
Verified

Namespaces

The C++ compiler can assign object addresses to pointers at program run-time.

Free
(True/False)
4.9/5
(31)
Correct Answer:
Verified

False

Private visibility is for members of a class that should not be accessible to anyone but the class, not even classes that extend it.

(True/False)
4.8/5
(38)

Member functions generally have __________ visibility, so we should be able to access a member function that is inherited.

(Short Answer)
4.9/5
(44)

To access a single name from the namespace in which it was declared requires a using __________ .

(Short Answer)
4.9/5
(37)

A(n) __________ function is a virtual function that is declared but for which no body (definition) is provided.

(Short Answer)
4.8/5
(38)

The __________ relationship between classes means that every instance of one class is or may be associated with one or more instances of the other class (but not necessarily the other way around).

(Short Answer)
4.9/5
(41)

According to the inheritance structure defined by the code fragment below, an Airplane is a kind of Jet_Plane. class Jet_Plane : public Airplane { private: int num_engines; Jet_Engine jets[4]; // ... };

(True/False)
4.9/5
(37)

__________ is a process that resolves name conflicts by collecting common data fields and member functions into a common base class.

(Multiple Choice)
4.8/5
(29)

The objects of a derived class __________ the original data fields and members of a base class.

(Short Answer)
4.9/5
(38)

If you dynamically cast a pointer to a lower type object, the lower type object is promoted to a higher type.

(True/False)
4.9/5
(36)

A pointer variable (l-value) that is of type pointer-to- __________ class may point to a derived object (r-value).

(Multiple Choice)
4.8/5
(33)

Given that the Lap_Top class derives from Computer class, which of the following pointer declarations is legal?

(Multiple Choice)
4.9/5
(22)

At the top of the level of the namespace hierarchy resides the global namespace, whose name is effectively the __________ string.

(Short Answer)
5.0/5
(40)

Which of the following statements is a valid abstract member function declaration for class Food?

(Multiple Choice)
4.8/5
(31)

Objects further down the hierarchy are more complex and less general than those further up.

(True/False)
4.8/5
(39)

The statement __________ creates an object of type stack as defined in the optimize namespace. Class stack { ... }; // Defined in the global namespace Namespace optimize { Class stack { ... }; // Defined in the optimize namespace }

(Multiple Choice)
4.8/5
(43)

Complete the header for class Artist, which inherits from both class Musician and class Writer. class Artist __________

(Short Answer)
4.9/5
(40)

Classes can be arranged in a hierarchy, with a top-level __________ class.

(Short Answer)
4.7/5
(32)
Showing 1 - 20 of 25
close modal

Filters

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