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 code

21/12/2020 Client: saad24vbs Deadline: 24 Hours

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.


Applied Sciences

Architecture and Design

Biology

Business & Finance

Chemistry

Computer Science

Geography

Geology

Education

Engineering

English

Environmental science

Spanish

Government

History

Human Resource Management

Information Systems

Law

Literature

Mathematics

Nursing

Physics

Political Science

Psychology

Reading

Science

Social Science

Home

Blog

Archive

Contact

google+twitterfacebook

Copyright © 2019 HomeworkMarket.com

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:

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

ONLINE

University Coursework Help

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

$142 Chat With Writer
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.

$145 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.

$140 Chat With Writer
Homework Guru

ONLINE

Homework Guru

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

$142 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

Bfc monster energy drink - Answer the question in 500 words - Martens schematic theory of personality - Bowles and gintis 1976 - K bright ltd cutlery - 1967 referendum vote percentage - Blood basics assignment answer key - Is 11/14 a terminating decimal - Bitcoins - Two sided refutational message - Https us megabus com journey planner basket - Supplychain 2go com ph and look for etrace - Curfews for minors pros and cons - Discussion Question - 26 l of the a - Virus explorer student worksheet answers - Evidence based interventions psychology - Ka kha ga writing - Reflection paper - Projectiles launched at an angle worksheet answers - Alpha phi omega hazing - Importance of scheduling for batch production - Suspense account and errors - Training needs analysis template pdf - Wave on a string worksheet answers - Management Principles, Two Papers each 2 and half min pages of full text MLA - Ben and jerry's swot analysis 2017 - Your Leadership Profile - First ionisation energy definition - Laws and Innovations - Political cartoon dred scott decision - Book fold napkin steps - Altech uec remote control model b3 - Ibm websphere mq 9 download - Silver nitrate and copper experiment - Nursing - Characteristics of living things reading comprehension - Townsend mortgage company excel - Creating a leadership team for successful ehr implementation - Hive single channel receiver - Planning/Evaluation Project #39855467Health & Medicine - Shark tank pitch script - Brian deckert detroit become human - Complete incomplete and codominance - How to create an ipo chart for c++ - How to write a tv show in an essay - Webi reports best practices - Hcf swimming lessons rebate - If resources are not adequate to meet peak demands - Theme of what you pawn i will redeem - Methods for documenting student progress - Gen 103 week 1 assignment - Past experience perceptual set - Summary of the loneliness beyond poem - I need help with writing a Management class paper. - The natural edge project - Discussion - How kick a soccer ball - Bhopal gas tragedy case study questions - Dwight grabs jim's junk bloopers - Southern cross early entry - Prepare a classified balance sheet ignoring monetary amounts - Ai weiwei school bags - Lewis dot diagram for hcn - Assignment 2 10/31/20 - Nutrition, Feeding, and Eating - Dassault systemes financial calendar - Starch iodine complex colour - Ben and jerry's vermonster price - Pressure velocity compounding ppt - Stork pmt poultry processing systems - Hydrometer lab report - Telecommuncation - 3 pages and 2 pages #30 - On morality joan didion rhetorical devices - Doctrine and covenants section 46 - Digital logic and computer design by morris mano pdf - Cultural Diversity - Philosophy assignment - Restricted electrical worker's licence - Stone age rap song - Individual Written Report - Harvard Business Case - Is dirt a renewable resource - Dapps rule example - Paper - Reading Journal - Bandicoot holes in garden - Group project - Milestone One Assignment - Griffith writing and referencing guide - Amazon Strategic management worksheet - Shadow health tina jones discharge - Public key cryptography and pki lab report - A consensus of procedures in the career counseling models - Plantae autotroph or heterotroph - 1.1 kg in grams - EDUC 510 evaluation of video lesson - Theme 3 lesson 8.2 a managing your money answers - The unsettling of america chapter 1 summary