Inheritance vs Interface Polymorphism (C++)
Doxygen docs for the C++ implementation
Loading...
Searching...
No Matches
DogWithDefault Class Reference

Concrete AbstractAnimal that implements the required speak() method. More...

Inheritance diagram for DogWithDefault:
Collaboration diagram for DogWithDefault:

Public Member Functions

void speak () override
 Pure virtual method that subclasses must override.
Public Member Functions inherited from AbstractAnimal
void sleep ()
 A concrete default method, inherited as-is by all subclasses.
virtual ~AbstractAnimal ()=default

Additional Inherited Members

Protected Attributes inherited from AbstractAnimal
int age = 0
 Structural state isolated inside a class footprint (interfaces cannot hold this).

Detailed Description

Concrete AbstractAnimal that implements the required speak() method.

Definition at line 84 of file C++ Implimentation.cpp.

Member Function Documentation

◆ speak()

void DogWithDefault::speak ( )
inlineoverridevirtual

Pure virtual method that subclasses must override.

Implements AbstractAnimal.

Definition at line 86 of file C++ Implimentation.cpp.


The documentation for this class was generated from the following file: