title: How to find object with biggest attribute value in ArrayList (using different classes)
body: <p>Java beginner here. I'm supposed to find the best result a participant has in an event (and later compare this result to others to find the winner etc).</p>
  <p>I made classes for an event (with list of event results) , participant (with list of participant's total results), and result (with event obj, participant obj and result (double)) + a program class for the commands.</p>
  <p>So far I have written a method that returns a participant's best result in an event as a double, but I need to return the entire result object instead. Not sure which class should be responsible for this (?) but I put this method in the event class for now.</p>
  <pre><code>public double getBestResultDouble(Participant p) {
          double best = 0;
  
          if (hasResult(p)) {
              for (Result r : eventResults) {
                  
                  if (p.equals(r.getParticipant())) {
  
                      double res = r.getResult();
  
                      if (res &gt; best) {
                          best = res;
                      }
                  }
              }
          }
          return best;
      } 
  </code></pre>