Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USING JAVA!!!! Pls note that there are only two rounds meaning that ties can be done. Example: IF A WINS ROUND 1 AND TIES IN

USING JAVA!!!!

image text in transcribedimage text in transcribedimage text in transcribed

Pls note that there are only two rounds meaning that ties can be done.

Example:

IF A WINS ROUND 1 AND TIES IN ROUND2. A WINS

IF A TIES ROUND 1 WITH B AND WINS ROUND2. A IS STILL THE WINNER

BUT IF A TIES IN ROUND 1 AND ROUND 2. THEN IT IS A TIE!

TIES AND WINS ARE THE ONLY things THAT ARE DISPLAYED.

code should be in java thank you.

2.2.1 Method to Implement: getRPSGameReport Problem. You are asked to consider the rock-paper-scissors (RPS) game (for which it is assumed that you know how to play it). Rock is denoted by character 'R', paper by 'P', and scissors by 'S'. As a reminder: rock wins scissors, paper wins rock, and scissors wins paper. Let's consider two example runs (where the same two players swap the order from one game to another): Enter the name of player 1: Doraemon Enter the name of player 2: Edward Scissorhands What does Doraemon play at round 1 (R, P, S)? R What does Edward Scissorhands play at round 1 (R, P, S)? S What does Doraemon play at round 2 (R, P, S)? R What does Edward Scissorhands play at round 2 (R, P, S)? S Game over: Doraemon wins! [Round 1: Doraemon wins (R vs. S) ; Round 2: Doraemon wins (R vs. S)] Enter the name of player 1: Edward Scissorhands Enter the name of player 2: Doraemon What does Edward Scissorhands play at round 1 (R, P, S)? S What does Doraemon play at round 1 (R, P, S)? R What does Edward Scissorhands play at round 2 (R, P, S)? s What does Doraemon play at round 2 (R, P, S)? R Game over: Doraemon wins! [Round 1: Doraemon wins (R vs. S) ; Round 2: Doraemon wins (R vs. S)] In this 2nd example run: - The Round 1 result shows: Round 1: Doraemon wins (R vs. s). - More precisely, R vs. S shows that rock wins scissors, despite the order of the players. - That is, the left-hand side of vs. always shows the play that wins, not what player 1 (in this case Edward Scissorhands) plays. A similar argument also applies to the Round 2 result

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_2

Step: 3

blur-text-image_3

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

Intranet And Web Databases For Dummies

Authors: Paul Litwin

1st Edition

0764502212, 9780764502217

More Books

Students also viewed these Databases questions

Question

LO5 Highlight five external recruiting sources.

Answered: 1 week ago