   help with arrayList class in java...
  hey,i am trying to make this program for my java class...this is what I have in main:import java.util.ArrayList;public class CRS{public static void main (String []args){Instructor [] inst = new Instructor [3];Student [] stud = new Student [3];Course [] cours = new Course [3];ArrayList <Registration> registration = new ArrayList  <Registration>();inst [0] = new Instructor ("Ron Davidson", 1);inst [1] = new Instructor ("William Davis", 2);inst [2] = new Instructor ("Kevin Wilson" , 3);cours [0]= new Course ("CS100", "Intro to Comp Sci", 5, 30, 15, inst [0]);cours [1]= new Course ("CS151", "OOP with C++ I", 4, 25, 22, inst [1]);cours [2]= new Course ("CS143", "OOP with Java II", 3, 40, 38, inst [2]);stud [0] = new Student ("Shivam Mathur", 1);stud [1] = new Student ("Linda Clark ", 2);stud [2] = new Student ("Mark Harris", 3);registration.add (new Registration (0.0, cours [0], stud [0]));registration.add (new Registration (0.0, cours [1], stud [1]));registration.add (new Registration (0.0, cours [2], stud [2]));registration.add (new Registration (0.0, cours [1], stud [0]));registration.add (new Registration (0.0, cours [2], stud [1]));registration.add (new Registration (0.0, cours [0], stud [2]));registration.add (new Registration (0.0, cours [2], stud [0]));registration.add (new Registration (0.0, cours [0], stud [1]));registration.add (new Registration (0.0, cours [1], stud [2]));System.out.println ("Creating instructors...");System.out.println ("Creating courses...");System.out.println ("Creating students...");System.out.println ("Registering students...");System.out.println ("Assigning grades...");System.out.println ();System.out.println ("SID\t" + "StudentName\t" + "Course\t" + "Credits\t" + "Instructor\t" + "Grade");System.out.println ("---\t" + "-----------\t" + "------\t" + "-------\t" + "----------\t" + "-----");for (int i = 0; i < registration.size(); i++){System.out.println(registration.get(i));}}}One of the requirements for the assignment was not to assign grades when registrations are created. So I created registration with grades 0.0 for all grades. Now I have to assign grades to every student using the setStudentGrade() method. But I don't know how to use it with the arrayList class becuase I didn't create registrations in this formatRegistration regi1 = new Registration(0.0, cours [0], stud [0]);with this I could have just done "regi1.setStudentGrade(3.4);"I hope this makes sensethankyou   
  Access the desired Registration from the list, and then setStudentGrade() it as desired. The ArrayList.at() method will do what you need - note it does *not* copy the object; a change you make to the return value affects the Registration within the list. This is a natural consequence of the Java object model, which you should make very sure you understand fully.   ;  i am not really sure what you are having trouble with, but why not extend arraylist by creating your own student class that contains fields which include grade?   ;  I can't figure out the right syntax to change the grades from 0.0 to a actually grade like 3.7 or something.   