Question: Suppose a C + + project has classes Animal, Dog, and Dobermann, with the following 3 level inheritance hierarchy: A Dobermann is - a Dog
Suppose a C project has classes Animal, Dog, and Dobermann, with the following level inheritance hierarchy:
A Dobermann isa Dog
A Dog isan Animal
Suppose the following code is in an application program that uses the Animal, Dog, and Dobermann classes:
int main
Dobermann dob;
Each of the constructors and destructors in the Dobermann, Dog, and Animal classes all have a cout statement inside of them.
What is the output of this program?
DOBERMANN CONSTRUCTOR
DOG CONSTRUCTOR
ANIMAL CONSTRUCTOR
ANIMALDESTRUCTOR
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
