-
Notifications
You must be signed in to change notification settings - Fork 0
/
professor.rb
47 lines (38 loc) · 897 Bytes
/
professor.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# object for containing SEI on a professor
class Professor
def initialize(instructor, course, campus, term, numberOfSEIs, averageRating)
@instructor = instructor
@course = course
@campus = campus
@term = term
@numberOfSEIs = numberOfSEIs
@averageRating = averageRating
end
#returns instructor name
def instructor
@instructor
end
#returns course name
def course
@course
end
#returns campus name
def campus
@campus
end
#returns term name
def term
@term
end
#returns numberOfSEIs name
def numberOfSEIs
@numberOfSEIs
end
#returns averageRating name
def averageRating
@averageRating
end
def to_s
"[#{@instructor}, #{@course}, #{@campus}, #{@term}, #{@numberOfSEIs}, #{@averageRating}]"
end
end