Rock-Paper-Scissors due Mon 27 Feb 10:00

\begin{purpose}
In this assignment you will:
\begin{itemize}
\item utilize p...
...ct keyword to enhance the design of
your program
\end{itemize}
\end{purpose}

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. At the end of those exercises you should have a base RPSPlayer class from which two subclasses inherit HumanRPSPlayer and ComputerRPSPlayer.

Begin by making two changes to your existing code:

  1. Modify the fight() method in RPSPlayer so that if there is a tie the players will square off again. Have them continue playing until someone wins.
  2. Designate the RPSPlayer class to be abstract and its pose() method to be abstract.

Once these changes are working, do a commit.

For the remainder of this assignment you will be working on a new class which you will test using a driver. The class is a ``player container'' and should be designed in accordance with this UML diagram:

RPSPlayerContainer
- RPSPlayer [] players an array of players
- int numPlayers the number of players in the container
+ RPSPlayerContainer() reserves 100 slots in the array
+ add(RPSPlayer p) given a player object, adds them to the container
+ display() displays all players in the container

In your driver demonstrate that your RPSPlayerContainer works properly. When the program is complete make sure all work is committed and pushed to your bitbucket repository.

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.

Quick Links