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 with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter8: Arrays
Section: Chapter Questions
Problem 4MQ2
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 with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage