1.) Write a Monte
Carlo simulation to estimate the payout for the game of Okapi. This game is
played by rolling three dice. A payout in dollars is determined by the rolled
numbers according to the following rule:
1. If the three numbers are the same, the player wins the
sum of those three numbers.
2. If only two of the numbers are the same, the player wins
the sum of the two equal numbers.
3. For three different numbers, the player wins nothing.
2.) Write a program
that prompts the user for a string of digits and a positive integer k ≤ 9, and
outputs the greatest k-digit substring.
3.) Write a JavaFX application that draws the image shown
below. The dimensions of the scene are 500 x 500. The drawing is formed by
creating a series of centered squares, starting with a square of side length
340 and decreasing the length by 10 pixels for each smaller square, down to
length 20. The fill color alternates between red and green. Red squares are
rotated 45 degrees. Each square is drawn with a black border of width 4.
Get Free Quote!
326 Experts Online