Exam 11: Inheritance and Composition

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

____ is the ability to use the same expression to denote different operations.

(Multiple Choice)
4.9/5
(33)

____ is a "has-a" relationship.

(Multiple Choice)
4.7/5
(36)

In ____________________ (aggregation),one or more members of a class are objects of another class type.

(Short Answer)
4.9/5
(34)

In multiple inheritance,the derived class has more than one base class.

(True/False)
4.9/5
(40)

Suppose that bClass is a class.Which of the following statements correctly derives the class dClass from bClass?

(Multiple Choice)
4.8/5
(35)

The new classes that we create from existing classes are called ____ classes.

(Multiple Choice)
4.9/5
(30)

Classes can create new classes from existing classes.This important feature ____.

(Multiple Choice)
4.9/5
(41)

In object-oriented design,we debug ____________________; in structured programming,we debug functions.

(Short Answer)
4.9/5
(41)

A derived class can directly access the protected members of the base class.

(True/False)
4.8/5
(43)

Which of the following is true about inheritance?

(Multiple Choice)
4.8/5
(32)

Inheritance is an example of a(n)____ relationship.

(Multiple Choice)
4.9/5
(40)

OOP implements ____.

(Multiple Choice)
4.8/5
(39)

A derived class cannot directly access public members of a base class.

(True/False)
4.9/5
(39)

Which of the following statements about inheritance is true if memberAccessSpecifier is protected?

(Multiple Choice)
4.8/5
(29)

C++ provides ____________________ functions as a means to implement polymorphism in an inheritance hierarchy.

(Short Answer)
4.8/5
(39)

If inheritance is private,all members of the base class,including private members,become private members of the derived class.

(True/False)
4.7/5
(44)

Which of the following class definitions makes the public members of the class aClass become the public members of the class bClass?

(Multiple Choice)
4.8/5
(35)

The term ____________________ is used to describe the ability to create new objects from existing objects.

(Short Answer)
4.9/5
(37)

Consider the following class definitions: class bClass { Public: Void setX(int a); //Postcondition: x = a; Void print()const; Private: Int x; }; Class dClass: public bClass { Public: Void setXY(int a,int b); //Postcondition: x = a; y = b; Void print()const; Private: Int y; }; Which of the following correctly sets the values of x and y?

(Multiple Choice)
4.7/5
(34)

In the case of composition,the ____________________ name is used to invoke the constructor.

(Short Answer)
4.9/5
(39)
Showing 21 - 40 of 50
close modal

Filters

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