Member Avatar for KatWoman27

This is what I need help with:

"Write an application to simulate the rolling of two standard six-sided dice. The application should use an object from the class Random to roll the first die and then again to roll the second. Each die can have the values of 1 to 6 and the sum of the dice can have values from 2 to 12. Use a one-dimensional array to tally the number of times each possible sum appears. The application should roll the dice 36,000 times. Display the results in a tabular format and determine if your results are reasonable".

What code would give me this?

Member Avatar for KatWoman27

art 2:

Write an application to simulate the rolling of two standard six-sided dice. The application should use an object from the class Random to roll the first die and then again to roll the second. Using a two-dimensional array to tally the actual combinations of rolls. A roll of 2 and 6 would be different than a roll of 6 and 2. The application should roll the dice 36,000 times. Display the results in a tabular format and determine if your results are reasonable.

commented: In the space of a few minutes, you've moved from lazy to annoying - http://www.daniweb.com/forums/thread278457.html -4

Write a for loop from 1 to 36000. Check the Random class and use the method return a random number twicwe in the loop. Once for the fist die and second for the second die.

First create 2 dies
Then make a button called roll
When roll is clicked
For i = 0; i < 36000; i++
Call random class for numbers from 1 - 6
and save that number as the first die
Call it again and save that number as the second die


If you want the actual code check my site below

This is not a place for you to advertise for free your site. Go away!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.