I have been struggling for hours to figure out how to do this. I already have a method that randomizes the answer every time I roll the dice called throwDice(). However, I can't seem to figure out how to return the answer. I am attaching my code thus far.
Add to your demo() method a loop that invokes throwDice() a million times, and print out the number of times you got a 1, the number of times you got a 2, and so on up to 6. These numbers should all be about 1/6th of a million. Here is an example of what your output should resemble (it won't be identical):
1: 166674396
2: 166690012
3: 166659722
4: 166662230
5: 166665847
6: 166647793
Without looking at the pictures you attached, what the logic would be if you were meant to solve it in plain english?
1. Roll a dice
2. Check which number you got
3. Register that number
4. Do step 1 again (as many times as you need)
...
5. Print results of 1, 2, 3, 4, 5 and 6.