Random RND Random Num RND - Nextint (3) : New Int
Random RND Random Num RND - Nextint (3) : New Int
3. Once you have the users selected value and the computers randomly
generated value, properly implement decision making in your code that determines the correct winner or if the game is a draw.
4. Display who is the winner or display if the game is a draw.
Grading Rubric
(15 points) Does the program correctly read user input. This includes :
Only accepting valid values. (i.e. 0, 1, 2 ), and excludes everything else.
In the case of invalid input, does the program let the user know? It is OK
if your program exits when it detects invalid input given that you display
a good message explaining why the program is exiting.
(7 points) Does the program correctly determine winners based on users
input and computers randomly generated number?
(8 points) Does the program display to the user who wins or loses or if the
game is a draw.
(10 points) Is the program well documented. A well documented program
includes good variables names and commenting of non-obvious code.
(5 POINTS EXTRA CREDIT) Modify your program to run rock-paperscissors in a best of 3 format, i.e. first player to win 2 out of 3 games wins.
This must be done with 1 execution of the program. Running the program 3
times does not count.
Submission:
Submit a java source file named Rps.java to ilearn in the Assignment 4 section.
FAILURE TO SUBMIT A JAVA SOURCE FILE WILL SEVERELY
HURT YOUR GRADE