Search for question
Question

Assignment

Create a class diagram for a dragon object that will be used

in a game.

The dragon has the following characteristics:

max health

current health

color, ie: blue, red

strength

Note: All characteristics should be only visible to the class

The dragon should be able to:

fly publicly accessible

attack publicly accessible

calculate strength modifier visible only to the class

take damage - publicly accessible

takes a parameter called damage

Publicly accessible method to return the color of the dragon

(accessor)

The class should include a constructor that overrides the

default constructor and takes the following parameters

max health

current health

color

Strength

Need pseudocode