Skip to content

mwagner86/CPP_03

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CPP_03

Inheritance

Exercise 00:

Aaaaand... OPEN!

First, you have to implement a class! How original! It will be called ClapTrap

Exercise 01:

Serena, my love!

Because you can never have enough ClapTraps, you will now create a derived robot. It will be named ScavTrap and will inherit the constructors and destructor from ClapTrap. However, its constructors, destructor and attack() will print different messages. After all, ClapTraps are aware of their individuality.

Exercise 02:

Repetitive work

Now, implement a FragTrap class that inherits from ClapTrap

Exercise 03:

Now it’s weird!

In this exercise, you will create a monster: a ClapTrap that’s half FragTrap, half ScavTrap. It will be named DiamondTrap, and it will inherit from both the FragTrap AND the ScavTrap. This is so risky!

Releases

No releases published

Packages

No packages published