Im having trouble trying to work out what data structure to use for an assignment .
I have a main program and a Student class . The main program using Scanner to get input from the user that asks for 1. Number, 2 Last Name, 3 First Name, 4 Number of Subjects they want to enter data for. --- up until this point im fine - i create the student object using this info (in the constructor) and place it in a vector in the main program. All fine up to here --- it then goes on to ask for the subject number (from a menu I display) , the number of assignments to enter for that subject, then the homework marks and the exam marks for each assignment. This is where im having trouble. The way im trying is to create a method in the Student class that add to an arraylist - using a seperate method and arraylist for each piece of data (i.e. one for the subject numbers, one for the number of assignments, on for HW marks, one for ex Mark. The reason im doing this is my previous code (before I had a student class and vector) I simply used arrays in the main code to store these before printing out to screen and my program logic is designed around this. I can see though that it is probably not the best way and will get complicated for trying to get this info back and using it in the right order. I think I need some other way to store it , probably using a single data structure that will somehow hold the number of subjects, the subjects numbers, how many assignments each subject has and the hw and ex marks for each subject. So my questions is , what data structure would be best suited to this , that I can use in my class ,update with a method and easily read back in the data. I am just asking for suggestions I can research please and not any code as it is an assignment. Bearing in mind im a beginner and wont be connecting to a DB or anything , just something like arraylists, vectors etc (although i dont think they are suitable - but i might be wrong)
thanks