I have to create two classes: Student and Course. The purpose of the program is to have the user create students and courses and add students and drop them from courses. I was told by my professor to create an array called "Student" in the course class. What I'm having a problem understanding is how to pass the student object created by the user in the class "EnrollStudent" to "Course" to fill the array "Student". If you could help me understand this I would really appreciate it! Thanks!
First I assume you are getting at least one compilation error for your Course class. The addStudent method should not be static.
Once you've fixed that you will need to call that method to add a student to the course.
The first thing you need to do is find out which course the student is to be enrolled on. Lets assume for the moment it's only going to be one course - we can expand it later to support multiple courses.
Probably the easiest way to do this is to display a numbered list of courses and ask the user to enter the number of the course.
Give that a go and see how far you get. You'll need a for loop to display the list and it needs to go after line 39 where you create the Student object.