The program must be in JAVA language Main will contain a Scanner and a declaration of an integer array (but will not allocate the space for it), and some print statements. The rest of main is method calls. read_list: a method to ask the user for an array size to use, allocate the proper memory for the array, prompt the user to enter the data, one element at a time, and return the completed array to the caller. print_list will print a comma separated list of the array elements on one line. avg_list will calculate the average value of all of the elements in the array. print_larger will print those elements of the array which are greater than the average of all of the elements. add_num will ask the user for an integer value between 5 and 10 (including 5 and 10), add that value to each element of the array. The array contents will then be printed again, with their new values, list_sum will add all of the elements of the array together to get a total value of them.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter8: Arrays
Section: Chapter Questions
Problem 20RQ
icon
Related questions
Question
  1. The program must be in JAVA language
  2. Main will contain a Scanner and a declaration of an integer array (but will not allocate the space for it), and some print statements. The rest of main is method calls.

  3. read_list: a method to ask the user for an array size to use, allocate the proper memory for the array, prompt the user to enter the data, one element at a time, and return the completed array to the caller.
  4. print_list will print a comma separated list of the array elements on one line.
  5. avg_list will calculate the average value of all of the elements in the array.
  6. print_larger will print those elements of the array which are greater than the average of all of the elements.
  7. add_num will ask the user for an integer value between 5 and 10 (including 5 and 10), add that value to each element of the array. The array contents will then be printed again, with their new values,
  8. list_sum will add all of the elements of the array together to get a total value of them.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 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