public static void main(String[] args) {
   BaseballElimination division = new BaseballElimination(args[0]);
   division.wins("Princeton");
   // division.certificateOfElimination("Detroit");
   /*
   for (String team: division.teams()) {
       //System.out.println(division.wins(team));
       System.out.println("Current Team: " + team);
       division.isEliminated(team);
       System.out.println();
   }
   */
   /*
   BaseballElimination division = new BaseballElimination(args[0]);
   for (String team : division.teams()) {
       if (division.isEliminated(team)) {
           StdOut.print(team + " is eliminated by the subset R = { ");
           for (String t : division.certificateOfElimination(team)) {
               StdOut.print(t + " ");
           }
           StdOut.println("}");
       }
       else {
           StdOut.println(team + " is not eliminated");
       }
   }
   */
 }
Exemplo n.º 2
0
 public static void main(String[] args) {
   BaseballElimination division = new BaseballElimination(args[0]);
   for (String team : division.teams()) {
     if (division.isEliminated(team)) {
       StdOut.print(team + " is eliminated by the subset R = { ");
       for (String t : division.certificateOfElimination(team)) StdOut.print(t + " ");
       StdOut.println("}");
     } else {
       StdOut.println(team + " is not eliminated");
     }
   }
 }