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

Rise of Progressivism Discussion - Spherical mirror 1 mastering physics - Legrand 2 compartment trunking - Huawei hq shenzhen address - HAGER WERKEN +27839281381 EMBALMING COMPOUND POWDER FOR SALE - Is 7 8 a repeating or terminating decimal - The sagebrush state 5th edition pdf - Colonial first state geared share fund - Snail in ginger beer - Mk masterseal timer socket instructions - Equations of motion worksheet with answers - Refer to the circuit shown in fig 8.64 calculate - Psychological first aid questions and answers - Crofthandy village hall cornwall - Salah is the coolness of my eyes hadith - I need Help Completeing my communication assignment - Electron geometry vs molecular geometry - Cole and sav proposal - Incident report for lost item - Marketing Analysis - Forum #4 - 100 in standard form - Jk flip flop lab experiment - Four seasons hotel financial report - How to prepare acidic buffer - Six kingdoms of life characteristics - Https docs python org 3 library random html - Knauf insulation safety data sheet - Physics 151 csulb - English Critical thinking homework - Past tense of light - Pascal's triangle even and odd - Create a 500 Word Essay? - Economic Assignment(12 hours) - Rubric for collage poster - Ids gmbh analysis and reporting services - Lions international insurance certificate - Mastering Virtual Assessments: The Advantage of Take My Online Exam Services - How to apply for a trade support loan - Past tense of teach - Mfj screwdriver antenna controller - Grading cup to disc ratio - Unilever brazil case study - Currency convertor code in python - The norton introduction to literature portable 11th edition pdf - A2: Units 3 and 4 (Congress and Presidency) - Quality management plan examples - Electing tribunes and displaying the law of the twelve tables - Head cook at weddings and funerals - Erikson's stages of development summary - Workplace Success Discussion Post - A concise introduction to criminal justice - Smiley face braces orlando fl 32818 - Highest paying adf job - Jinx episode 3 escape from area 52 - Rl circuit lab report conclusion - Worker cob csu chico - Spotlight 4 student's book pdf - Discussion: Criminal Justice Policy Actors - 2 - Rules of the game amy tan activities - Augmentin duo forte dose - Calvin goddard contribution to forensic science - Meet the student teacher template - Leadership role - Terrorism and organized crime - John locke psychology tabula rasa - Company Financial Appraisal - Discuss and identify leader traits and attributes that are most beneficial in implementing the best decisions in an organization. - "A" WORK POWERPOINT IN 18 HOURS or LESS - Curing the incurable cookbook by gary null - Kings mill hospital physiotherapy - Wire rope safety barrier vicroads - Global Health : Final Project Two Submission: Policy Analysis and Testimony Transcript - Nursing: Essentials of Evidence-Based Practice - The advantage of vernier caliper over micrometer is that it - Five mission competencies gcu - New holland br740a specs - Work and efficiency formula - Vertical integration is going backward on an industry's value chain - Analyze one of the Two Essays - Knight company reports the following costs and expenses in may - Ovania chemical case study - Nursing leadership practicum objectives examples - Crocodile clips circuit design - For math guruu - Spelling connections grade 7 unit 16 answers - The cellist of sarajevo chapter summary - Nursing diagnosis for chronic lung disease - Advantages and disadvantages of database - Las pirámides de teotihuacán están lejos del valle de méxico. - Absorption and variable costing problems and solutions - Aldus photostyler windows 7 - Ccms helpdesk contact number - Chapter 9 accounting for receivables - Asean strategic action plan for sme development 2016 2025 - Job requirements matrix for sales associate - Electronic devices floyd 9th edition ppt - Ritz carlton case study harvard analysis - Discussion