I have CSV file which is in the form as below
student, year, subject, score1, score2, score3
Alex, 2010, Math, 23, 56, 43
Alex, 2011, Science, 45, 32, 45
Matt, 2009, Art, 34, 56, 75
Matt, 2010, Math, 43, 54, 54
I'm trying to find an optimal solution to read the CSV file and load it to a map for lookup purposes i.e. Map<String, Map<String, List<SubjectScore>>>. The first string key is for student, the next string key is for year.
class SubjectScore {
private String subject;
private int score1;
private int score2;
private int score3;
}
If there is a better way to store the CSV structure to get SubjectScore based on student and year information, I'll like to know that.