Skip to content

Conversation

@waleolakareem
Copy link

No description provided.

"High five!"
end

end
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually for modules that are going to be included in classes, we use "-able" names, so here it'd be HighFiveable. Module names should be related to the methods that are defined in it.


def set_performance_rating(rating)
response = ""
if rating > 90
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set_performance_rating is still common between the ApprenticeTeacher and SeniorTeacher classes. How will you extract it ?

"Cool, I've always wanted to teach phase #{num}!"
end

end
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are still some common methods between the Student and Teacher classes.
For eg: name, age, phase methods exist in both the classes.
How will you refactor this?

response = "Listen, class, this is how everything works. *drops crazy knowledge bomb* ... You're welcome."
response
end

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

teach_stuff method is common in both the Teacher and ApprenticeTeacher classes except for a few words. Can you think of a way to extract it into the Parent class?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants