Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1 . When the website visitor opens the page, a dialog box should appear asking them how many dice ( from 1 - 5 )

1. When the website visitor opens the page, a dialog box should appear asking them how many dice (from 1-5) they want to roll.
a. If the user enters a value from 1 to 5, use that number of dice.
b. If the user enters an invalid entry, display an error message and ask them again.
c. If the user clicks Cancel, display a dialog box indicating that a default value of 2 dice will be used.
d. When the user has chosen an appropriate number of dice (or clicked Cancel), the web page should be generated displaying images for the number of dice chosen with the ids image1 to image5, and a frequency table for the possible roll values with all frequencies set to 0 and all percentages set to 0.000%.
2. When the website visitor clicks on the Roll them bones! button, the dice will begin rolling and stop rolling 1 second later.
a. A roll consists of a new random number (from 1 to 6) being generated every 100 milliseconds for each die. The image for each die must be updated to represent the current random number (dice1.png, dice2.png,..., dice6.png).
b. When the dice are rolling, the user should be prevented from starting a new roll.
c. The result of the roll must be displayed in the pRolled paragraph (for example, You rolled 10!).
d. The result of the roll must be added to the list of the previous ten rolls in the pPreviousTenRolls paragraph. This list only displays the most recent 10 rolls; rolls older than 10 are bumped from the list. The most recent roll is at the end of the list.
3. For each roll, the roll statistics must be updated.
a. In tblStats, the frequency of each possible roll must be updated, and the frequency as a percentage of the total number of accumulated rolls must be updated.
b. The total number of rolls in the pTotalRolls paragraph must be updated.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management With Website Development Applications

Authors: Greg Riccardi

1st Edition

0201743876, 978-0201743876

More Books

Students also viewed these Databases questions