Hello, so I am in a
Java class and there is this program that I am struggling to even understand how to do.
There is a Survey Array that takes values from a survey file stored on one's computer (simply known as "survey" with a TXT extension). Each Survey value is composed of 5 elements: "MONTH, DAY, HOUR, MINUTE, ANSWER" and they get added to an Array known simply as SurveyData[] which then somehow goes into an Array known as SurveyResults[] which arranges each value by the answer represented by a number 1-5.
The assignment asks for two programs: one to list the index with the greatest amount of answers corresponding to a number (1-5) and the other to least the index with the least amount. By specific request of the teacher, one is only allowed to use an old-style for loop to do this. Also, it was suggested that one start at index 1 and compare indices backwards (so compare index 1 to index 0, index 2 to index 1, etc.).