HW07: RPS Tournament due Mon 04 Mar 10:00

\begin{purpose}
In this assignment you will:
\begin{itemize}
\item utilize p...
...ompareTo()} method to alter the behavior of a sort
\end{itemize}
\end{purpose}

Allowed and Disallowed Resources

In completing this assignment you MAY use/access the following resources:

You may NOT use/access:

Failure to abide by these guidelines will result in a zero for the assignment and the incident will be reported to the university provost as a violation of the university academic integrity policy. A second incident of academic dishonesty (whether from this course or another computer science course) will result in an F in the course.

Instructions

In your workspace make sure you have the most recent code from the base repository and from your homework repository on bitbucket. This assignment is a continuation of the work you did on lab day.

Take these steps in hw07:

  1. Add an abstract play() method (no return type and no parameters) to your RPSTournament class. This method will be used to stage the tournament. As you know there can be various types of tournaments: round robin, single elimination, double elimination, etc. You will also need to make the RPSTournament class abstract as a result of this change.

  2. Create a new class called RoundRobinTournament that inherits from RPSTournament. In the new class provide a definition for the play() method that has every player in the tournament play a rock-paper-scissors bout with every other player in the tournament.

  3. Modify the RPSPlayer compareTo() method so that instead of comparing players by name it compares them by their win/loss record. We would say that player1 is greater than player2 if player1 has more wins than player2. If player1 and player2 have the same number of wins then we would say player1 is greater than player2 if player1 has fewer losses than player2. If player1 and player2 have the same number of wins and the same number of losses then they are equal.

  4. In the driver create an instance of the RoundRobinTournament class and add seven players to the tournament. Then play the tournament. Once all games have been played sort the players (best record first) and display all players including their name, number of wins and number of losses.

As you work, document your code and commit at appropriate times. When you complete your work be sure to push all committed changes to bitbucket.

Grading

The assignment will be graded according to the following criteria:
Correctness 16 pts
Documentation 2 pts
Conventions 2 pts
Version Control 2 pts
Total 22 pts

Your program should be completely working and should follow all of the programming conventions named in class and explained in http://josephus.hsutx.edu/classes/all/javaconventions/ (including the use of comments that conform to the JavaDoc guidelines).

The instructor will grade your work based on what you have pushed to the hosted homework repository you have shared. For all assignments the program is due before the beginning of class on the due date. Repositories that show a commit time after that time will be graded as late.