Quote:
error: cannot find symbol
The error message says it all: your code contains a symbol that hasn't been declared. A symbol can be the name of a variable, class or function.
Quote:
The error is specifically pointing to the period after c1
Since you have used c1 before, this doesn't seem to be the culprit. So look what's beyond that period:
getCreditHours()
. Maybe that function doesn't exist, or it goes by a different name (e. g.
getCourseHours()
?), or you've made a typo when defining that function. Check the definition of the
Course
class and see if it has the function
getCreditHours
. Make sure it's exactly spelled like that.
On a sidenote: why do you prefix everything in the
Course
class by '
course
'? That's a needless duplication. Except when you don't: e. g. 'creditHours'. That's needlessly inconsistent and confusing - and it might be the source of your error.
P.S.: I have some doubts about the field
creditHours
: if it is what is implied by it's name, it sholdn't be a member of the
Course
class to start with! It is a property of the relation of students to the courses they participate in, not a property of the course, nor is it a property of the student. That might be the reason why your naming scheme broke: when deciding on the name, you actually realized it's not about the course!