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:
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.
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.