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
(73)

____ is a "has-a" relationship.

(Multiple Choice)
4.7/5
(78)

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

(Short Answer)
5.0/5
(77)

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

(True/False)
4.9/5
(90)

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

(Multiple Choice)
4.8/5
(73)

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

(Multiple Choice)
4.9/5
(73)

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

(Multiple Choice)
4.9/5
(79)

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

(Short Answer)
4.9/5
(85)

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

(True/False)
4.8/5
(88)

Which of the following is true about inheritance?

(Multiple Choice)
4.8/5
(65)

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

(Multiple Choice)
4.9/5
(72)

OOP implements ____.

(Multiple Choice)
4.9/5
(85)

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

(True/False)
5.0/5
(86)

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

(Multiple Choice)
4.9/5
(72)

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

(Short Answer)
4.8/5
(84)

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
(78)

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
(86)

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

(Short Answer)
4.9/5
(87)

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.9/5
(84)

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

(Short Answer)
4.8/5
(82)
Showing 21 - 40 of 50
close modal

Filters

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