Flow Chart

Classic programmed-learning exercises, refreshed for modern Java and presented in the current MrStyner.com portfolio style.

Modern Java noteThis archive has been refreshed for Java 25 LTS. Core language concepts remain useful, while outdated setup instructions and browser-era Java are labeled or replaced. Java 26 is the current feature release; Java 25 is used here as the stable teaching baseline.
go to previous page   go to home page   hear noise   go to next page

Answer:

What advantage does the computer have in this game?

The computer's throw must be beaten by the player. In case of a tie, the computer wins the round.

What advantage does the player have in this game?

The player can select from a uniform distribution (one 11-sided die) or a non-uniform distribution with 6-7-8 the most common outcomes (two regular dice). Is this enough to overcome the computer's advantage? Play the game and see!

Flow Chart

Here is the main logic of the program. Study how it implements the rules of the game. Some additional details are needed for some of the steps. The "Player's Toss" box, for one, needs to implement the details of giving the player a choice of dice and then throwing that choice.

main logic

QUESTION 18:

How many random number generators are needed for this program?