Question: public void setChoice 1 ( Hero _ CZ 9 7 3 9 1 4 [ ] heroes ) { / / function to Show all
public void setChoiceHeroCZ heroesfunction to Show all characters by alphabetical ordered
HeroCZ myFile new HeroCZ; myFile.getNamecompareToHeroCZlength; for HeroCZ myFile : heroes System.out.printlnmyFile;
public void setChoiceHeroCZ heroes, String attackAbility function to Find characters with attack ability
for HeroCZ myFile : heroes if myFilegetAttackAbilityequalsIgnoreCaseattackAbility System.out.printlnmyFile;
public void setChoiceHeroCZ heroes function to Sort characters by hightolow power
HeroCZ myFile new HeroCZ; myFile.getPower; for HeroCZ myFile : heroes System.out.printlnmyFile;
public void setChoiceHeroCZ heroes function to calculate the total power from all power
totalPower ; for HeroCZ myFile : heroes totalPower myFile.getPower; return;returns the total power
public void setChoicelistfunction list for choice System.out.println Cybernetic; System.out.println Pyrotechnic; System.out.println StrengthGrowth; System.out.println HostileBoost; Program four separate methods that implement the following: Show the list on the screen sorted alphabetically by the names. Find and show all characters with a specified attack ability. Show the list on the screen sorted from the lowest to the highest characters power. Calculate the total power of all characters. For each method decide what are methods parameters to receive and process and what is the returning value if any. IMPORTANT: Methods should not change the original array received from the file in any way.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
