Question: C++ programming, done in visual studio Create a class called SuperHero. The SuperHero class should have a default constructor(that prints Hero created and a destructor(that
C++ programming, done in visual studio

Create a class called SuperHero. The SuperHero class should have a default constructor(that prints "Hero created" and a destructor(that prints a message saying the hero was defeated). Every Hero has a name member variable which is NOT public. Every Hero has member functions: saveTheDay(which prints "T'm here to save the day."), setName (which sets the name member variable) and getName Derive 2 classes from SuperHero: DCHero and MarvelHero. Both child classes inherit everything from the parent, but they all have their own version of the saveTheDay function(overriding the function). Both classes should have a constructor and destructor In main, create 3 objects and call the function to set their names; DCHero superMan; //feel free to substitute your favorite heroes here MarvelHero spiderMan; SuperHero wordGirl; Ask the user which Hero they would like to interview. this save function for that hero. Based on their answer, call void save(SuperHero& hero) { cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
