Object Methods
Lesson 31Author : 🦒
Last Updated : November, 2017
Code
class Student
attr_accessor :name, :major, :gpa
def initialize(name, major, gpa)
@name = title
@major = author
@gpa = gpa
end
def has_honors()
if self.gpa >= 3.5
return true
end
return false
end
end