Need some assistance modifying attached code to meet/produce the following requirements/output:
Write a program that reads numbers from the keyboard into an array of type int. Assume that there will be 50 or fewer entries in the array. The program should allow any number of numbers to be entered, up to 50 numbers. The output is to be a two-column list. The first column is a list of the distinct array elements; the second column is the count of the number of the occurrences of each element. Sort the list on entries in the first column, largest to smallest. For example:
the output would be:
Note: the columns should be properly spaced, as in my attached code, and there should be 1 column of numbers under each heading. Please use descriptive comments throughout so that I can understand what the code is doing.
Thank you for your assistance.© BrainMass Inc. brainmass.com October 9, 2019, 10:55 pm ad1c9bdddf
This solution provides a modified Java program that calculates occurrences.