Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I NEED HELP WITH THIS ONE. PLS WRITE IT IN JAVA CODE. HERE IS SOME MY INSTRUCTOR DON'T NEED TO PUT IT IN: DON'T USE

image text in transcribedimage text in transcribedI NEED HELP WITH THIS ONE. PLS WRITE IT IN JAVA CODE. HERE IS SOME MY INSTRUCTOR DON'T NEED TO PUT IT IN:

DON'T USE THE MATH.RANDOM() HE DOESN'T WANT TO . THE MAIN METHOD SHOULD HAVE A WHILE LOOP IN IT AND IT GOING BACK AND FORTH BETWEEN THE 2 PLAYERS. WE DON'T USE SYSTEMS.EXIT(0). THIS PROGRAM ALSO NOT HAVE THE COMPUTER ALGORTHIM, 12A IS STILL ABOUT USING THE 2 PLAYERS HUMAN. DON'T USING BOOLEAN. PRIMATIVES HAVE LOWER CASE LETTERS. NEXT WE DON'T USE GLOBAL VARIABLES BECAUASE IT VILATES HOW WEARE TRYING TO PASS VALUE BACK AND FROTH BETWEEN METHOD

PLS WRITE IT IN BASE ON THOSE RULE . THANKS FOR YOUR HELPimage text in transcribed

018 Programming Assignment #12A abus Due Monday by 9:59pm Points 10 Submitting a file upload File Types zip and java dules This assignment will give you practice with while loops and pseudorandom numbers. You are going to write a program that allows the user to play a simple game. The Dice game "Pig" is a ame played by the following rules. Each turn a player rolls a single six sided die. If the player rades rolls a two through six, (2.3,4,5,6) then they get that many points plus they get the option to roll again. On each successive roll they get to add the die roll to their total, and choose again to risk a re-roll. Pages However, if the player ever rolls a one (1) then they get zero points, their turn is over and they lose all the points that have gained for the current round So if the player chooses to stop their turn before they roll a one(1) then they get that many points. For example: Player 1 rolls a 1. Turn over, score -o. Player 2 rolls a 4, chooses to roll again, rolls a 5, chooses to stop. Turn score is a 9, overall score is 9 Player 1 rolls a 5, then chooses to roll again, rolls a 4, rolls again, rolls a 1. Turn over, turn score is o, overall score is . Player 2 rolls a 6. Chooses to stop. Turn score is 6, overall score is 15. . Player 1 rolls a 3, then chooses to roll again, rolls a 5, rolls again, gets a 6, rolls again, B gets a 4, rolls again, gets a2, rolls again, gets a 1. Turn over, turn score is 0, overall score is O. Player 2 rolls a 4, chooses to roll again, gets a 5, chooses to roll again, gets a 6, chooses to stop. Turn score is 15 Pause B 9 0 8 Pg Up

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2015 Porto Portugal September 7 11 2015 Proceedings Part 1 Lnai 9284

Authors: Annalisa Appice ,Pedro Pereira Rodrigues ,Vitor Santos Costa ,Carlos Soares ,Joao Gama ,Alipio Jorge

1st Edition

3319235273, 978-3319235271

More Books

Students also viewed these Databases questions

Question

What happens after O2 binds to protonated hb in rbc in the lungs?

Answered: 1 week ago