Question: Create a class called Dragon in a file named Dragon.java that extends Monster and does the following: Declare an integer constant called BASE _ STRENGTH

Create a class called "Dragon" in a file named Dragon.java that extends Monster and does the following:
Declare an integer constant called BASE_STRENGTH which is set to 50.
Create an override method of calcSTR which returns an integer that determines the strength of the Dragon as the value of BASE_STRENGTH plus 1/3 of the size times the level.
Has a constructor for Dragon that requires three parameters: a String for name, an integer for level, and an integer for size. Uses the parent Monster's overload constructor along with parameter values as passed and uses the value of "Dragon" as the type.
Set size to 3.
Uses the Dragon class calcSTR override method to determine and set the Dragon's strength. Sets hitPoints based on calcHP from the parent class
 Create a class called "Dragon" in a file named Dragon.java that

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!