Virtual Functions destructor1


Submit solution

Points: 10
Time limit: 5.0s
Memory limit: 12M

Author:
Problem type
Allowed languages
C++

TASK

To Learn virtual function and destructors

Base class Name:Vehicle

Derived Class Name1: bus1 inherits Vehicle

Derived Class Name2: car1 inherits Vehicle

More details are given in the function Template

Input:

No user input

Output:

class bus1:change gear

class car1:apply break

bus1 destructor called

Vehicle destructor called

car1 destructor called

Vehicle destructor called


Comments

There are no comments at the moment.