Final weeks



Current lecture topics:

random numbers,  and evaluating a random number generator

About time


Reading:

Form elements review

HappyLoop

Assignment #7 -- due date postponed until Wed. April 26th.

Assignment #8 -- due date : last day of class: Friday May 5th

Create a page containing five image tags, two buttons, a <select> and a <textarea>. The images tags will each contain a picture of one of six possible outcomes for the dice portraying the numbers one through six..

The first button: When the user clicks on the button, all dice are rolled once. For each die when rolled, the src of its image tag is replaced with a random one of six possible pictures -- each picture being chosen with equal probability (1/6).

The select: The user may select any of the numbers one through six. Whenever a picture is clicked upon, then that die takes on the value shown inside the <select>.

The textarea: Results of the dice rolls should be kept as a running log (a cumulative history) in a textarea at the bottom of the page. With each roll (initiated by the click of the button), we should be able to see the complete history of all current and previous dice rolls. You need not consider changes brought about clicks on individual dice in conjunction with the <select>

The second button: A button below the textarea, should allow the user to obtain a report (overwriting the current contents of the log in the textarea) which tabulates the frequency of each of the six outcomes plotted separately for each of the dice. The frequency tabulation should show how often each die was rolled, as consistent with the data stored in the log.

You may use the template shown here, but design your own dice.

multiple events and textareas
.split()

Reminder: there is a required format for class related e-mail

Final Exam -- see here  


Time permitting:

Dynamic HTML and rewriting pages: document.write and innerHTML

the document object model,