What is the new class called in the context of inheritance?
Derived class or subclass.
What is the mechanism of deriving a new class from an old one called?
Inheritance (or derivation).
1/26
p.2
Base Class vs. Derived Class

What is the new class called in the context of inheritance?

Derived class or subclass.

p.2
Definition of Inheritance

What is the mechanism of deriving a new class from an old one called?

Inheritance (or derivation).

p.8
Defining Derived Classes

What does 'visibility-mode' specify in a derived class definition?

It specifies the access level of the base class members in the derived class.

p.3
Single Inheritance

What is single inheritance?

A derived class with only one base class.

p.7
Hybrid Inheritance

What is Hybrid Inheritance?

The process of combining more than one type of inheritance together while deriving subclasses in a program.

p.2
Defining Derived Classes

What does the derived class inherit from the base class?

Some or all traits.

p.2
Multiple Inheritance

Can a class inherit properties from more than one class?

Yes.

p.4
Multiple Inheritance

What is multiple inheritance?

A derived class with several base classes.

p.2
Reusability in Object-Oriented Programming

What is an important feature of Object-Oriented Programming (OOP)?

Reusability.

p.5
Hierarchical Inheritance

What is hierarchical inheritance?

A process where the traits of one class are inherited by more than one class.

p.1
Definition of Inheritance

What is inheritance in object-oriented programming?

Inheritance is a mechanism where a new class extends an existing class.

p.9
Visibility Modes in Inheritance

What is the result of private derivation in a derived class?

Members of the derived class can access the private members of the base class, but they are not accessible outside the derived class.

p.9
Defining Derived Classes

What is the syntax for declaring a derived class with public derivation?

class derived: public base { members of derived };

p.2
Base Class vs. Derived Class

What is the old class referred to in inheritance?

Base class.

p.2
Multilevel Inheritance

Can inheritance occur from more than one level?

Yes.

p.6
Multilevel Inheritance

What is multilevel inheritance?

The mechanism of deriving a class from another 'derived class'.

p.1
Defining Derived Classes

What is a derived class?

A class that is created from another class, inheriting its attributes and methods.

p.9
Visibility Modes in Inheritance

What is the default mode of derivation if not specified?

Private derivation.

p.5
Hierarchical Inheritance

What does hierarchical inheritance allow in terms of class relationships?

It allows multiple classes to inherit from a single base class.

p.8
Defining Derived Classes

What is the general form of defining a derived class?

class derived-class-name : visibility-mode base-class-name { ………. // members of derived class ………. // };

p.9
Visibility Modes in Inheritance

In a derived class, what happens to the members of the base class in private derivation?

They are not accessible outside the derived class.

p.1
Defining Derived Classes

What does it mean to extend a class?

To create a new class that inherits properties and behaviors from an existing class.

p.1
Reusability in Object-Oriented Programming

What is the purpose of inheritance?

To promote code reusability and establish a relationship between classes.

p.9
Visibility Modes in Inheritance

What does public derivation in a derived class allow?

Members of the derived class can access public members of the base class, and they remain accessible outside the derived class.

p.8
Defining Derived Classes

What is the purpose of a derived class?

To inherit properties and behaviors from a base class.

p.9
Defining Derived Classes

What is the syntax for declaring a derived class with private derivation?

class derived: private base { members of derived };

Study Smarter, Not Harder
Study Smarter, Not Harder