Question: Heads or Tails java program https://github.com/seccodingguy/CMSC325/tree/master/src/cmsc325gameconcepts Using the Strategy and StrategyRandom class, create a game that prompts the user to choose heads or tails, flips
Heads or Tails java program
https://github.com/seccodingguy/CMSC325/tree/master/src/cmsc325gameconcepts
Using the Strategy and StrategyRandom class, create a game that prompts the user to choose heads or tails, flips a virtual coin, and then displays the results to the user. The game must continue until 100 flips have been completed. Save the results of the flip results in a format of your choosing.
Modify the code to include the StrategyProbability class, using the results saved from the StrategyRandom as the starting values for the setMoves() function. The game must continue until 100 flips have been completed. Save the results of the flip results in a format of your choosing and separate from the StrategyRandom results.
For both 2 and 3, generate statistics on the odds of getting the right guess as well as the number of heads and tails flipped, displayed, respectively, to the user as well as saved with the results.
The program does not have to use graphics of actual coins - this is optional.
The 100 flips can be generated manually, i.e. user pressing a button, or automatically.
Thanks,
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
