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 diagram

01/12/2021 Client: muhammad11 Deadline: 2 Day

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:

WRITING LAND
Coursework Helper
Quick N Quality
Fatimah Syeda
Engineering Exam Guru
Engineering Mentor
Writer Writer Name Offer Chat
WRITING LAND

ONLINE

WRITING LAND

I will provide you with the well organized and well research papers from different primary and secondary sources will write the content that will support your points.

$50 Chat With Writer
Coursework Helper

ONLINE

Coursework Helper

I have done dissertations, thesis, reports related to these topics, and I cover all the CHAPTERS accordingly and provide proper updates on the project.

$15 Chat With Writer
Quick N Quality

ONLINE

Quick N Quality

I am an experienced researcher here with master education. After reading your posting, I feel, you need an expert research writer to complete your project.Thank You

$22 Chat With Writer
Fatimah Syeda

ONLINE

Fatimah Syeda

I will be delighted to work on your project. As an experienced writer, I can provide you top quality, well researched, concise and error-free work within your provided deadline at very reasonable prices.

$27 Chat With Writer
Engineering Exam Guru

ONLINE

Engineering Exam Guru

I find your project quite stimulating and related to my profession. I can surely contribute you with your project.

$43 Chat With Writer
Engineering Mentor

ONLINE

Engineering Mentor

I will provide you with the well organized and well research papers from different primary and secondary sources will write the content that will support your points.

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

Research paper - Emco high voltage a series - The writing process part 2 - Louis vuitton in japan case study analysis - Is xeo3 polar or nonpolar - Chapter 1&2 revised - Lavoisier acid base theory - Youth homeless north east - Wileyplus exercise answers - Community engagement acu - Cisco ios security command reference - Carlill v carbolic smoke ball co [1893] 1 qb 256. - Timmons disputed moral issues - Research in Nursing - Soft skills paragraph - Reasons to donate blood speech - Homeschooling Proposal IRB - Plus one web series - Bus tie circuit breaker - Challenges faced by industrial training schemes for workers - Write the first five multiples of 9 - CAPSIM Rounds - Shoreline stadium case study answers - Week 4 Apply: Strategic Management Research Journal Part 4 - Week -3 theory - Waste management plan template doc - Main idea of me talk pretty one day - Occupational health cornwall council - Australia's first peoples cultural awareness for health online module - Essay - Homework - Forensic Accounting - Table tennis scoring rules - Harvard process analytics simulation answers - Loop invariant for linear search - Australian qualifications framework at certificate iv - St peter and st james hospice warehouse - Tanx 1 cotx cotx 1 tanx 1 tanx cotx - Puzzle 131 pandora's box - A patient has just received her first dose of imatinib - How to find invoice price of a bond - Eco 204 week 2 assignment - P&g japan the sk ii globalization project pdf - Pangea cut out activity - Process improvement and change project presentation - Breezair evaporative cooling manual - Organizing data into matrices - 68 pittwater road manly - Cost accounting 14th edition - Child psychologist central coast nsw - Cruelty civility and other weighty matters - Applying and interviewing for employment - Why use nacl plates in ir - 1100 words Due 9/28/2020 Advantages and disadvantages of probability vs. non-probability sampling in research - What is a competitive profile matrix - Limitations of language laboratory - Enterprise Risk Management - Friend of god song - Pem fasteners distributors uk - Writing for the mass media 9th edition pdf free - Dept of transport wa transfer papers - Some lessons from the assembly line audience - Belief as to the truth of something - Guys and st thomas paediatric formulary - How has the get tough movement influenced juvenile rights - Bus6 - Define a speculative narrative - Edith hamilton mythology quizlet - SOCW6361 - Disaster, Crisis, and Recovery Logistics - Describe the abercrombie & fitch style - Econ Essay - Bank vision statement examples - Pan flute length formula - Niddrie mill primary school - Managing technology at genex fuels case study - Xray vision led light bar - Wk 3, HCS 430: DR 1 - Japan Single Payer powerpoint - Khan academy moon phases - Mackay hose catalogue pdf - Eastern districts tennis association - Power acoustik mofo 15 - S&s controller and bookkeeping services - 568a and 568b standards - Vcap 6.5 deploy dumps - Digestive system animation game - Cloud infrastructure architecture case study - Readings about the social animal 11th edition pdf - Hectors world episode 3 - Accounting Paper - Strategic planning and budgeting ppt - The company's facility for assembling cameras is located in - Ethics in Psychology - Samsung case study marketing management - Module Peer Discussions - Simple linear regression without intercept - Deer valley district office - Discussion 150 words - Mathers co bank reconciliation july 31 - Csi wildlife answers