this is a C++ program.
CS 161 Programming Lab 6 For this exercise you will create a version of the Rock, Paper, and Scissors game that is played against the computer. The program will use a number of functions as listed below. The computers move will be randomly generated. Problem description While this program will be an introduction to using functions, it will also be a review of data validation and loops. In addition to using functions, you will be using enums as described in Moodle. For this, as in all assignments, you are expected to follow the course programming style guidelines. Program Functionality The game must use enums to represent both the user and computer moves. Each function should have at least one comment. Constants should be used where appropriate. Display a clear set of instructions to the user ho Input R, P. or S from the user. Validate the input, if incorrect prompt the user to re-enter until correct. Either upper or lower case is ok. Get a random computer move. Display clear output describing the outcome of the game including the user's pick, the computer's pick and the winner. Ask the user if they would like to play again and repeat the entire game again as necessary. Required Functions At a minimum the program should have the following functions: displayinstructions no parameters o tells the user how to play the game no return values o O getMove O no parameters o get a move from the user and validate (R.r. P. p. Sors) o return appropriate enum (Rock, Paper, Scissors) getComp Move o no parameters o generate a random value 0, 1, or 2 o return appropriate enum (Rock, Paper, Scissors) getWinner two parameters (user move and computer move as enums) generate om Valle LUZ o return appropriate enum (Rock, Paper, Scissors) getWinner o two parameters (user move and computer move as enums) This work by Jim Bailey is licensed under a Creative Commons Attribution 4.0 International License. determine winner as described below output the results o no return values O playAgain no parameters ask the user if they want to play again o valid the result (v) o return true for y, false forn Suggestions Read the document on enums before starting Think about how to pass a parameter as an enum (hint, it is just like passing an int, but using the name of the enum). Since both the player's move and the computer's move are in enums, it is possible to use a simple series of if statements to determine the winner. 1 (player Move > computerMove) player wins else if (player Move - Rock && computer Move -- Scissors) player wins else if (player Move I computer Move) computer wins else the game is a tie