Description Note: You must use the variable names specified and you must not "hard-code" results. Write a Java program that will randomly generate ages for 20 students in CS161, and store them in an...


Description<br>Note: You must use the variable names specified and you must not

Extracted text: Description Note: You must use the variable names specified and you must not "hard-code" results. Write a Java program that will randomly generate ages for 20 students in CS161, and store them in an array, called ages. The ages should be in the range of 17 to 100 inclusive. When you have generated all of the ages, and populated the ages array, you must output them to the screen as shown below. Your program should calculate and print to the screen the number of students who are less than 40 years of age and the number of students who are 40 years of age or older. You should output these in the format as shown below. Your program should find the average age of students in the class and print this average to the screen, as shown below.

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here