void main() {
    Map<String, Integer> scores = new LinkedHashMap<>();
    scores.put("Ada", 88);
    scores.put("Grace", 92);
    scores.put("Alan", 45);

    String top = null;
    for (String name : scores.keySet()) {
        if (top == null || scores.get(name) > scores.get(top)) {
            top = name;
        }
    }

    IO.println(top + " has the highest score: " + scores.get(top));
}

// From Groundwork, chapter 9 (ch09-maps-and-sets), box 8.
// This example is from Groundwork, licensed CC BY-NC-SA 4.0.
// Run with: java ch09_08.java
