Hello somebody should please help me with codes to run this assignment below:

It should have a button that when clicked causes your code to simulate rolling a dice 100 times. Your program needs an array that will count the number of times that each of the six possible numbers is rolled; and then displays those count after the 100 rolls have taken place.

The pseudo-code for the task is as follows:

SET THE ARRAY TO HAVE ZEROES

REPEAT 100 TIMES

ROLL A RANDOM NUMBER BETWEEN 1 AND 6
ADD 1 TO COUNTER [DICEROLL]

END REPEAT

DISPLAY THE NUMBER OF 1S, 2S...

I look forward to hearing from you guys. Thanks

Edited 2 Years Ago by pritaeas: Removed email. Keep it on-site.

Nnadozie
Deleted Member

There are lots of people here who will freely give their time to help you become the best Java programmer you can be. There's nobody here who is interested in helping you cheat or doing your homework for you.

DaniWeb Member Rules (which you agreed to when you signed up) include:
"Do provide evidence of having done some work yourself if posting questions from school or work assignments"
http://www.daniweb.com/community/rules

Post what you have done so far and someone will help you from there.

Comments
only ups to be expected here

for those who down-voted JamesCherrill...
do you realise he's the only one here so far actually trying to help the OP?
plagiarism might get her expelled, depending on who she copies of, might even get her in jail. it sure as hell won't learn him/her to program.

the OP has agreed to the rules James mentioned, and no, we are not programmers for hire.

My advice would be to first of write this as a console app. Then when you are happy move to a GUI app.

All you need is one button to run the simulation then six text boxes 1-6, showing how many times each number was rolled.

This article has been dead for over six months. Start a new discussion instead.