Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please create lab with source code. Follow everything on assignment below except submission part. Lab 3 - Rock, Paper, Scissors Objectives: To use If-Statements to

Please create lab with source code. Follow everything on assignment below except submission part. image text in transcribed
Lab 3 - Rock, Paper, Scissors Objectives: To use If-Statements to affect the logical flow of your program To use Switch Statements To design a game and have fun You need to write a program to play "Rock, Paper, Scissors" Start by have the player input his/her choice-"R,'S', or P'. Hint, what data type should you use here? Then have the computer generate its choice randomly (0, , or 2). Remember to seed your random generator at the top of the main method. Now that you have the numeric choice, you will need to convert (using a Switch statement) it into a letter (R", "S', orP'.) Then determine the winner of the game. Remember that Rock crushes Scissors, Paper covers Rock, and Scissors cuts Paper. Have fun with this one. If you are up for an extra challenge, consider how you would introduce lizard and Spock into the game for rock, paper, scissors, lizard, Spock. Run: Make sure that you gain at least one win, one loss, and one tie. Do as many attempts as necessary to gain all three of these outcomes. Submission: Turn in the source program and your output. Please show all of the attempts, even if they are duplicates. (Include all of your wins, all of your losses, and all of your ties in the output) Please turn both the cpp file and the output text into drop box. See Lab 1's instruction sheet for details on how to document, save, and turn in your work. 1 CSE 1311 Pierce

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Database Programming

Authors: Chris Fehily

1st Edition

1937842312, 978-1937842314

More Books

Students also viewed these Databases questions

Question

Q.No.1 Explain Large scale map ? Q.No.2 Explain small scale map ?

Answered: 1 week ago