Please do this in Java, and if possible, please use a different array for each part.
[40 points] Using a standard array, write a program that first prompts the user and then reads an arbitrary number of integers that are in the range of 0 to 47 (inclusive) and counts how many occurrences of each number are entered. Inform the user that they can stop entering the data/numbers by entering a value outside of the specified range of 0-47.
[20 points] After the input has been processed, print all numbers (with the number of occurrences) that were entered one or more times. For example, "[12] 7 times," where "It is a TAB.
[20 points] Instead of the number of times, the program displays an asterisk (*) for each occurrence. For example, "[12] *******" for 7 occurrences.
[10 points] Instead of displaying just a string of asterisks, display an "I" for every fifth occurrence of an asterisk. For example, "[12] ****|**" for 7 occurrences.
[10 points] Modify the program so that it works for numbers in the range between -50 and 50.