C++

profileh2o
w43.docx

The purpose of this project is to use cin to handle user keyboard inputs, use branching statements to control the flow of a program, and work on your C++ programming style. You will implement a rock-paper-scissors game. The computer will select rock, paper, or scissors randomly (and of course not reveal this selection to the player). The player will then enter 1 for Rock, 2 for Paper, or 3 for Scissor. The program will let the player know if she or he won. At the end of each round ask the player if she or he wants to play again.

You must implement/include the following features in addition to the game play:

· Keep count of the number of times the player won and lost -- when the player chooses to stop playing, display these counts

· Keep a count of the number of times the player selects to play rock, scissors, and paper 

· Implement the computer's selection as a random integer 

Objectives:

· Work on your C++ programming style

· Use boolean expressions

· Use branching statements to control the flow of a program

Requirements:

1. Source code is documented correctly with name, lab section, and name of program

2. Your program source code must be neatly and consistently formatted (use GG=g in vim)

3. Program compiles and runs without error

4. Program handles user input with cin

5. Use at least one (1) switch statement and one (1) if statement

6. Computer generates an integer random selection

7. Prompt for and read in the player's selection

8. Compare the player's selection to the computer's selection

9. Display an appropriate message to the player to let them know whether they won or lost 

10. Keep a count of the number of times the player selects to play rock, scissors, and paper

11. Prompt for and read in the player's choice about playing another round

12. At the end of play, display the number of player wins and losses

13. Out of all the games played let the player know who was the overall winner (computer or player).  Also what the winning object (what object did the winner have the most wins with).

14. Tell the player what they should have chosen to win most of the time.  For example, if the computer chose rock 7 out of the 10 times then the player should have chosen rock to win most of the time.