Question: Define a Class called Ninja. a. Make instance variables for name, dojoName, and killCount. b. Create a static variable for totalKills c. Create a default

 Define a Class called Ninja. a. Make instance variables for name,

Define a Class called Ninja. a. Make instance variables for name, dojoName, and killCount. b. Create a static variable for totalKills c. Create a default constructor that defaults name to "No Name yet", dojoName to "No Name yet" and killCount to 0. d. Create a constructor that has parameters that set the value for name and dojo name. This will also set killCount to 0. Create accessor methods for all the variables (name, dojoName, killCount and totalKills). e. Create a method that increments killCount and totalKills f. Create a STATIC method that compares 2 ninjas to see who has more kills. This method will print out the name of the ninja with more kills and what percentage his kill number is from the total kills

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!