Create the following graphics

0 comments

Create the following graphics dice program.

The user will be “throwing” 5 dice.

Then they will “throw” each of the 5 dice by clicking on their respective outlined areas. When clicked/thrown the dice will appear in the outlined area. You will need to randomly generatePreview the documentView in a new window a number between 1-6 for each click/throw. After each click/throw the new dice total will appear in the bottom left of the window.

After all the dice have been clicked/thrown you will display a message below the dice total remarking on how lucky they are.

Have an Exit button the user can click to exit the program.

Notes: 
You can assume that the dice are clicked/thrown in order of 1 to 5.

If the user clicks outside of the dice outlines nothing should happen, no dice display, no error message.

You need to use a function that is called with every dice click/throw:

diceexample.png

About the Author

Follow me


{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}