Question: write a program that plays hot potato ask the user for a seed for the random number generator, and how many children are playing. toss

write a program that plays hot potato
ask the user for a seed for the random number generator, and how many children are playing.
toss the potato to one of the children(determined by a random number)
and then pass the potato to n (between 1 and 10--determined by random number) children in a circle
the nth child is eliminated --report who is eliminated
the eliminated player passes the potato to the next person
do this until only 1 child (the winner) is left, and report the winner
The children will just be numbered 1 to however many children there are.
You may use nothing that is not in chapters 1-7. Name your file LastnameHotPotato.java so that mine would be LichtenthalHotPotato.java
If either of these 2 things are not done, your work will not be graded
Honors, Extra credit.
input names for the children
don't use more info than chapter from 1-7 from the book

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!