Create an html document which does the following: 1. Generate an array of 100 integers with random number using the Math.random() method. 2. Display the contents of the array using comma ( , ) to separate the elements in a textarea. 3. Get the average of the 100 numbers then store its value. 4. Remove the top 10 largest numbers and the top 10 smallest numbers of the array. 5. Compute for the average of the new array. 6. Display the contents of the new array using comma to separate the elements in a textarea. 7. Compare the new average with average of the original array, show in an alert dialog box which average is larger?

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter8: Arrays
Section: Chapter Questions
Problem 9PE
icon
Related questions
Question
100%
Create an html document which does the following:
1. Generate an array of 100 integers with random number using the Math.random() method.
2. Display the contents of the array using comma (, ) to separate the elements in a textarea.
3. Get the average of the 100 numbers then store its value.
4. Remove the top 10 largest numbers and the top 10 smallest numbers of the array.
5. Compute for the average of the new array.
6. Display the contents of the new array using comma to separate the elements in a textarea.
7. Compare the new average with average of the original array, show in an alert dialog box which average is larger?
Transcribed Image Text:Create an html document which does the following: 1. Generate an array of 100 integers with random number using the Math.random() method. 2. Display the contents of the array using comma (, ) to separate the elements in a textarea. 3. Get the average of the 100 numbers then store its value. 4. Remove the top 10 largest numbers and the top 10 smallest numbers of the array. 5. Compute for the average of the new array. 6. Display the contents of the new array using comma to separate the elements in a textarea. 7. Compare the new average with average of the original array, show in an alert dialog box which average is larger?
Expert Solution
steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage