Question: In C + + create a class named Creature with private variables called name, which is a string data type; health, an integer data type;

In C++ create a class named Creature with private
variables called name, which is a string data type;
health, an integer data type; and strength, an
integer data type.
In the public section of the Creature class, create a
function named intro that doesn't return any values
and only outputs "A creature has been born!" When
the object is destroyed, the class output will be "A
creature was destroyed!"
In the main function, create two objects from the
class. The player object should have attributes of
"Hero," 100,30, while the monster should have
attributes of "Goblin," 50,10.
Output the name of the player and the monster
object and who is stronger, the Hero or the Goblin.
In C + + create a class named Creature with

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!