If you want to add a student to your course, you would need a list/array in your course object to save this in. Then when you want to add the student you want to call this course object and run a method that adds the student you have given to this list/array .