Hi all,
It might be just not having a good grasp of classes yet, but I’m not sure how to start creating the methods for the student and course exercise. I put in the initialize method and some of the getter methods, but I’m stuck at creating the enroll method and not sure how to start.
All help would be greatly appreciated!
class Student
def initialize(first_name, last_name)
@first_name = first_name
@last_name = last_name
@courses = []
end
def first_name
@first_name
end
def last_name
@last_name
end
def courses
@courses
end
def name
"#{@first_name} #{@last_name}"
end
def enroll(new_course)
#???
end
end