Loading...

Messages

Proposals

Stuck in your homework and missing deadline? Get urgent help in $10/Page with 24 hours deadline

Get Urgent Writing Help In Your Essays, Assignments, Homeworks, Dissertation, Thesis Or Coursework & Achieve A+ Grades.

Privacy Guaranteed - 100% Plagiarism Free Writing - Free Turnitin Report - Professional And Experienced Writers - 24/7 Online Support

Rock paper scissors lizard spock java program code

09/01/2021 Client: saad24vbs Deadline: 10 Days

CPS 150 Programming Assignment 5: RPSLS (Rock, Paper, Scissors, Lizard, Spock)


Update the Rock, Paper, Scissors program you wrote for Lab Project 14 so that it plays RPSLS.
The Rules for RPSLS are described by Dr. Sheldon Cooper on The Big Bang Theory (also quoted below), and shown in the diagram on the right.


Scissors cuts paper, paper covers rock, rock crushes lizard, lizard poisons Spock, Spock smashes scissors, scissors decapitates lizard, lizard eats paper, paper disproves Spock, Spock vaporizes rock, and as it always has, rock crushes scissors.





RPSLS Features (Updates):


· The user input should be text, not numerical (e.g., "rock" not 1). It should also be case-insensitive (see the Sample Run, below).


· Suggestion: use the Scanner method nextLine() instead of the Scanner method next() for user input.


· Suggestion: to minimize re-write of your existing code, "translate" the user input into one of five values (there are three in the original program);


· a good way to do this is to define and call a method static int textToNumber(String choice) .


·


· After each round, the user is prompted as to whether they want to play again (i.e., yes or no).


· Suggestion: only play again if the user enters yes; otherwise, end the game.


· Suggestion: use the Scanner method nextLine() instead of the Scanner method next() for user input.


·


· For each round, the user input of choice should be validated as one of the five valid choices; anything else causes the round to be forfeited and prompts the user as to whether they want to play another round.


· Suggestion: define a method static boolean isValid(String choice) and call it with the user choice as an if condition.


·


· You will have to add methods for the two new choices that the user can make:


· int lizardChoice(int computerChoice)


· int SpockChoice(int computerChoice)


· As with the original three methods, each of these two new methods returns one of the three named int constants PLAYER1_WINS, PLAYER2_WINS, or DRAW.


·


· You will also have to re-define (expand) the code in the original three methods rockChoice, paperChoice, and scissorsChoice to check whether the computer chose either of the two new choices (i.e., lizard or Spock).


 Sample Run (user input in color):


run:


Welcome to the game of Rock Paper Scissors Lizard Spock


Here are the rules:


    Scissors cuts Paper


    Paper covers Rock


    Rock crushes Lizard


    Lizard poisons Spock


    Spock smashes Scissors


    Scissors decapitates Lizard


    Lizard eats Paper


    Paper disproves Spock


    Spock vaporizes Rock


    (and as it always has) Rock crushes scissors


Ready? Then let's begin!


Player 1, enter your choice ( rock, paper, scissors, lizard, Spock ): rock


OK, you chose rock


Player 2 (computer) chooses rock


    It's a draw


Play again (yes/no)? yes


Player 1, enter your choice ( rock, paper, scissors, lizard, Spock ): spock


OK, you chose spock


Player 2 (computer) chooses lizard


    Lizard poisons Spock; Player 2 wins


Play again (yes/no)? yes


Player 1, enter your choice ( rock, paper, scissors, lizard, Spock ): banana <--- invalid input


Invalid choice "banana"; try again.


Player 1, enter your choice ( rock, paper, scissors, lizard, Spock ): Paper


OK, you chose paper


Player 2 (computer) chooses scissors


    Scissors cut paper; Player 2 wins


Play again (yes/no)? yes


Player 1, enter your choice ( rock, paper, scissors, lizard, spock ): <--- invalid input (empty string)


Invalid choice ""; try again.


Player 1, enter your choice ( rock, paper, scissors, lizard, Spock ): SCISSORS


OK, you chose scissors


Player 2 (computer) chooses paper


    Scissors cut paper; Player 1 wins


Play again (yes/no)? yes


Player 1, enter your choice ( rock, paper, scissors, lizard, Spock ): lIZARD


OK, you chose lizard


Player 2 (computer) chooses scissors


    Scissors decaptiate lizard; Player 2 wins


Play again (yes/no)? no


BUILD SUCCESSFUL (total time: 1 minute 30 seconds)


 --------------------------------------------------------------------------------------------


Assignment Grading (for each method):


· (Updated) Contract: 10%


· (Updated) Purpose Statement: 10%


· (Updated) Examples: 10%


· (Updated) Algorithm: 10%


(Updated) Method Code: 60%


What Do I Hand In?


Once you are done, upload the source code file (i.e., .java file) for your NetBeans project.

Homework is Completed By:

Writer Writer Name Amount Client Comments & Rating
Instant Homework Helper

ONLINE

Instant Homework Helper

$36

She helped me in last minute in a very reasonable price. She is a lifesaver, I got A+ grade in my homework, I will surely hire her again for my next assignments, Thumbs Up!

Order & Get This Solution Within 3 Hours in $25/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 3 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 6 Hours in $20/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 6 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 12 Hours in $15/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 12 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

6 writers have sent their proposals to do this homework:

Top Essay Tutor
Best Coursework Help
University Coursework Help
Helping Hand
Writer Writer Name Offer Chat
Top Essay Tutor

ONLINE

Top Essay Tutor

I have more than 12 years of experience in managing online classes, exams, and quizzes on different websites like; Connect, McGraw-Hill, and Blackboard. I always provide a guarantee to my clients for their grades.

$40 Chat With Writer
Best Coursework Help

ONLINE

Best Coursework Help

I am an Academic writer with 10 years of experience. As an Academic writer, my aim is to generate unique content without Plagiarism as per the client’s requirements.

$35 Chat With Writer
University Coursework Help

ONLINE

University Coursework Help

Hi dear, I am ready to do your homework in a reasonable price.

$37 Chat With Writer
Helping Hand

ONLINE

Helping Hand

I am an Academic writer with 10 years of experience. As an Academic writer, my aim is to generate unique content without Plagiarism as per the client’s requirements.

$35 Chat With Writer

Let our expert academic writers to help you in achieving a+ grades in your homework, assignment, quiz or exam.

Similar Homework Questions

Turkish films in london cinemas - Global marketing management kotabe helsen pdf - Cross site request forgery - Word module 1 sam project 2 - On demand assessment results - Bildungsroman in a sentence - Https www irs gov pub irs pdf f1040sc pdf - Roman jakobson on linguistic aspects of translation pdf - All arteries carry oxygenated blood except - Collective bargaining fair work act - Cybersecurity Planning - Dividing different exponents with different bases - 5 page work - Mgt 230 management planning presentation - Looking for trouble finding your way into a writing assignment - Balance the following redox reaction by oxidation number method - What rule does ralph set for the tribe - Https://www.thephysicsaviary.com/Physics/Programs/Labs/MillikanOilDropLab/index.html - Studying sn1 and sn2 reactions nucleophilic substitution lab report - Launching a new venture - Se habla espanol tanya barrientos essay - 3 h2o2 molarity - Zigby manufacturing production budget - X squared times x cubed - Boston college student services - Upper yarra reservoir camping - Kari lynn nixon find a grave - 521 If you have not already commented on at least four peer presentations in the discussion board, please do so before Sunday, 11:59 p.m. (Pacific time). - Cooey serial number lookup - Info tech Global economy- Project Work- Electronic Innovation and the Government- Week 7 - Mucor and pneumonia - 750-1000 words - Nursing Philosophy (4) - Yahoo mail https overview mail yahoo com - Market value of debt excel - Everybody sees the ants sparknotes - Bond breaking and bond making worksheet - Thomas armstrong 7 kinds of smart - 22a pinnacle row lennox head - 1.26 g cm3 to kg m3 - How hotdogs are made the brutal graphic truth - Stelrad radiator cover removal - Sqa chemistry assignment higher - Unit 3 Part 1 - Simile in the yellow wallpaper - Business & society stakeholders etc edition 15th - Business management final exam answers - Dragon quest xi angel bell - Discussion Board - Soap note - Managing Criminal Justice Organizations - Discussion 4-1 - Roy vagelos attacks river blindness - Palo alto url filtering block page - What does oil symbolise in baptism - Square root utility function - Diamonds arent forever tab - Apromo trading pty ltd - Intrinsic carrier concentration of silicon - Drill press safety sheet - Open ended questions in nursing - Chapter 10-11 summary paper - Looking For Dissertation Help UAE? - Diversity Issues in Criminal Justice _ Oral Presentation. - DQ4 - Standard components of a digital marketing plan - Celf 5 sample report - For all work solver - Andrew jackson video questions answers - Bbc dance mat typing - Prepare a business case for the global treps project - Ind aff or out of love in sarajevo - Cardiff university phd gown - 3rd order rate law - Accounting II Discussion ----Due Tomorrow - The wallingford bowling center case study - Gabriela montero biography - How to write service level agreement - The underground railroad colson whitehead pdf - Bible the greatest of these is love - First stage allocation in activity based costing - Different types of management accounting systems - Apple company human resource management - Literal and nonliteral meaning in semantics - P10 1a accounting answers - As 2601 demolition checklist - Nursing leadership practicum objectives examples - Montana 1948 prejudice quotes - Big two hearted river summary and analysis - Bernoulli's theorem experiment lab report - WP3 - Bus5 - The town hall meeting was desultory because - Movies directed by john hughes - Miercoles - Chapter 14 summary to kill a mockingbird - Nursing care plan book online free - Fronius primo wifi setup - Basic mathematics for economists pdf - Pettit hydrocoat ablative antifouling marine paint