Give me an in depth step by step explanation on how to solve this problem including a step by step explanation on how the ogic works for each answer choice. 10. Consider two parallel arrays which contain the names and corresponding scores of players in a trivia game. String names "Rob", "Pam", "Sandy", "Kelly", "Kim", "J.P."}; int I scores = (2600, 2420, 1790, 2100, 3100, 3250); Which of the following code segments correctly prints the names and scores of all the players who scored above high?

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter6: Arrays
Section: Chapter Questions
Problem 17RQ
icon
Related questions
Question

Give me an in depth step by step explanation on how to solve this problem including a step by step explanation on how the ogic works for each answer choice.
10. Consider two parallel arrays which contain the names and corresponding scores of players in a trivia game.
String names "Rob", "Pam", "Sandy", "Kelly", "Kim", "J.P."}; int I scores = (2600, 2420, 1790, 2100, 3100, 3250);
Which of the following code segments correctly prints the names and scores of all the players who scored above high?
(A) for (int element scores) if (element> high) System.out.print In (names + " " + element);
(B) for (int element scores)
if (element >= high)
System.out.println(names" "+element); (C) for (int i = 0; i < scores.length; i++)
if (scores [i]> high) System.out.println(names [i] + " " + scores [i]);
(D) for (int i = 0; i < scores.length; i++) System.out.println (names [i]+"" + scores [i]);
if (scores [i] >= high)
if (scores [i] high)
(E) for (int i = 0; i <= scores.length; i++) System.out.println(names [1] +""Cores [i]);

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Arrays
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage