Question: In c++ You You will be making 3 classes - One class is Character, it is the base class. It has a variable for health

In c++

You You will be making 3 classes -

One class is Character, it is the base class. It has a variable for health (int) and size (int)

The next is nonPlayer and the last is monster. They are derived off of Character

class nonPlayer has a talkative or nontalkative (true of false) data member

Monster has maxHit and MinHit data member (ints)

For every data member in the class you should have get and set functions.

In main, create all three types of classes and call a display function on it which shows the current value of the variables -- So, nonPlayer woudl say "Hi, I am talkative and I am size 3", and monster would say - The most "I hit is 30 and the min is 10. I am size 7". Character woudl just print "I am size 10".

You will have 7 files - 3 header files, and 4 cpp files.

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 Databases Questions!