Ejemplo n.º 1
6
 /**
  * Compares whether the values of two Football objects are equal
  *
  * @return true if same team (false if different teams)
  */
 public boolean equals(Object o) {
   if (!(o instanceof Football)) {
     return false;
   } else {
     Football other = (Football) o;
     return (other.getTeamName() == this.getTeamName()
         && other.getNumTitles() == this.getNumTitles());
   }
 }
Ejemplo n.º 2
0
 public static void main(String[] args) {
   System.out.println(Weather.getMinDifference());
   System.out.println(Football.getMinDifference());
 }