Create the following graphics dice program. see image.

The user will be throwing 5 dice.

The will throw each of the 5 dice by clicking on their respective outlined areas. You will the need to generate a number between 1-6 each click/throw and display that dice side in the clicked outlined area. After each click/throw the new running total will appear below the dice.

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 user can click to exit the program. You can assume that the dice are clicked/throw in order of 1 to 5. This program does not allow a second click/throw on a dice. If the user click outside of the dice outlines nothing should happen, no dice display, no error message.

You need to create and use a function that is called with every dice click/throw.

You need to create and use a function that generates the random dice number between 1-6.

This program draws the dice in the appropriate outlined area. You can do this by calling another function or functions.

This is the pattern for each of the sides of the dice. see image.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.