Answered step by step
Verified Expert Solution
Question
1 Approved Answer
JAVA without ArrayIndexOutOfBoundsException Task 5 Initialize a String array named names with the following values: Elena, Thomas, Hamilton, Suzie, Phil, Matt, Alex.nnEmora,, John, James, Jane,
JAVA without
ArrayIndexOutOfBoundsException
Task 5 Initialize a String array named names with the following values: "Elena", "Thomas", "Hamilton", "Suzie", "Phil", "Matt", "Alex."nn"Emora,", "John", "James", "Jane", "Emily", "Daniel", "Nedaz"n"Aasors", "Kate" Initialize another integer array named times, with the following values: 341,273,278,329,445,402,388,275,243,334,412,393,299,343,317, 265 The names correspond to runners and. The times are the total time taken in minutes to run a race. You need to do: (i) Find the fastest runner. Print the name and his/her time (in minutes). (ii) Find the second fastest runner. (iii) Find the average time for the runners. (iv) Display all runners whose running time was better than average Sample run: Fastest runner is John with 243 minutes Second fastest runner: Kate with 265 minutes Average time: 333.5625 All runners with better running time than average: Thomas Hamilton Suzie Emma John Daniel Aaron Kate
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started