Question: Everything coded in Java 1. Define a The following class hierarchy a. Enemy i. Variables for Name, health, strength ii. 2 Constructors. 1 default, 1

 Everything coded in Java 1. Define a The following class hierarchy

Everything coded in Java

1. Define a The following class hierarchy a. Enemy i. Variables for Name, health, strength ii. 2 Constructors. 1 default, 1 parameterized. iii. Accessor and Mutator Methods for all instance variables iv. Attack Method ->Make this print how much damage they do based on strength. v. Jump Method -> Make this print out how high they jump based on their strength *1.5 vi. writeQutput -> will print values of all variables for an object b. Fighter, child class of enemy i. Variable for weaponType, wearen Damage, armor Points ii. 2 Constructors iii. Accessors and Mutators for all variables iv. Override method for attack that will print out damage based on weaponDamage*str*.5 v. override writegutput to print appropriate variable values c. Ninja, child class of Fighter i. Variables for chakraPoints, bloodline Tyre, and Village ii. 2 Constructors iii. Accessor and Mutator Methods iv. Override for writegutput v. New method for bloodline Attack 1. Prints out NAME readies their BLOODLINETYPE, where the values of the variables will be printed for name and bloodlinetyre 2. Modify the student class in 8.2 so that it implements the comparable interface. Define the compare To method to order student objects based on the value in studentNumber. In a main method create an array of at least 5 student objects and sort them using Arrays.sort and output the students. They should be listed by ascending student number. 3. Create an interface MessageEncoder that has a single abstract method encode(plain Text) where the plain Text is the message to be encoded. The method will return the encoded version of the message. Then create a class SubstitutionCipher that implements this interface. The constructor should have on parameter called shift. Define the method encode so that each letter is shifted by the value in shift. For example if shift is 3 a will be replaced by d, b will be replaced by e. Create a private method that shifts one character to help with this. Write a demo program that will take a message from a user , a shift value, and then return the encoded message

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!