Member Avatar for Nnadozie

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

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.

commented: only ups to be expected here +13

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.

Member Avatar for iamthwee

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.

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.