Welcome to the CSC Q&A, where you can get help (and share your knowledge) about computer science!

On lab5, does anyone know how to print the name of the student who has the highest score? (step 9)

+3 votes
asked Oct 5, 2016 in CSC 211 (F16) by Lucas Simon (100 points)

2 Answers

+3 votes

A lot like finding the highest score (suggestions here)-- initialize a String variable with an empty string which gets overwritten with the name in the if statement whenever a higher score is encountered.

answered Oct 5, 2016 by Jon Clauss (100 points)
+1 vote
do it in the same "if" statement that u use to find the highestScore
answered Oct 5, 2016 by Trung Le (Jayden) (100 points)
Using an if statement that tests the highest score from the house preferred by the user and basically, matches the score with what the name was. Hope you got it figured out.
...