Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

short application that prints (a) 11. 138 points] Method design: The following output shows a fotal porwer of all Avenger members (b) alphabetical sorting (e)

image text in transcribed
short application that prints (a) 11. 138 points] Method design: The following output shows a fotal porwer of all Avenger members (b) alphabetical sorting (e) finding a specific name generate the same output a. Define printTeam method to print an array of Avenger names and their powers. b. Define sum method to add all powers of Avenger members e Define insertionSortstring method to sort names based on alphabetical order d. Define binarySearchString method to find a name of any Avenger, If found, returning the correct index. If not, display-1 The total team power is 34.e After applying Insertion sorting based-on alphabetical order; Black widow, 8.e Hulk, 1e.e Ironman, 3.e Spiderman, 6.e Thor, 7.e call binarysearchstring method to find whether any Avenger possess a name Thor' If found, returning the correct index. If not, display -1. Result: 4 public class GroupPower2_String f public static void main(String[] args) f Avengers[] team { new Avengers ("Ironman", 3), new Avengers ("Hulk", 10), new Avengers( Thor",7), new Avengers("Spiderman", 6), new Avengers( "Black Widow", 8)j; System.out.println("The total team power is "sum(team)) System.out.println(" After Bubble sorting by alphabetical order -- insertionsortstring(team); printTeam (team); System.out.println("InCall binarySearchString method to find" + "whether any Avenger possess a name Thor; +"If not, display -1. Inlt Result: ; System.out.print(" If found, returning the correct index." int foundIndexe2 binarysearchString(team, "Thor") System.out.printin(foundIndexez)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Data Mining

Authors: Pang Ning Tan, Michael Steinbach, Vipin Kumar

1st Edition

321321367, 978-0321321367

More Books

Students also viewed these Databases questions

Question

Will the individual understand it?

Answered: 1 week ago

Question

2. (1 point) Given AABC, tan A b b

Answered: 1 week ago

Question

When you need a permanent, unchangeable, or secure record?

Answered: 1 week ago