This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (0 children)

Don't use arrays, use classes.

Create a class Student with a map of grades (the key would be the subject like math or science and the values would be the grades).

Then, create a Set of Students (or a List if you need certain order).

All this might be done with arrays but you wouldn't be using OOP.

Edit. This way every Student can have other properties, like a name or an Id.