# Project 41

One - Dimensional Arrays & getParameter(50 points)
Write an applet which will find the mean average of "hm" many integers. Your applet must first retrieve an integer from an HTML file. This number will represent how many numbers which will be averaged. Based on this number, use a for loop to retrieve from the same HTML document those numbers which will be averaged. If there are hm many integers, then fill a one-dimentional array with these integers as follows :

num[0] = 14, num[1] = 10, num[2] = 22 ... num[hm-1] = x.
Where xis the last number in the list.

Use a second for loop to find the sum, and a third to dump out the array list. Output each term in equation form. The last term must not be succeded by a plus symbol. For example,

• If your HTML document contains the following parameter tags :
< param name = hm value=4 >
< param name = num0 value=14 >
< param name = num1 value=10 >
< param name = num2 value=22 >
< param name = num3 value=12 >
The first parameter tag indicates that four integers will be averaged. Those four integers are 14, 10, 22 and 12. The output should be :
(14 + 10 + 22 + 12)/4 = 14.5

Other Requirements:

• Document your applet. Include your Name, Date, Project#, and a description of the project.
• Test your results with a calculator and by changing your HTML document with different parameter tags.
• Output your result with the TextArea class.
• Allocate enough memory for 10 array elements.