Modules And Mixins In Ruby - Study Mode
[#1] What is inheritance in Ruby?
Correct Answer
(B) A mechanism by which a class can inherit properties and behaviors from another class
[#2] What does the super keyword do in Ruby?
Correct Answer
(C) Calls the same method in the superclass
[#3] Which keyword is used to define a private method in Ruby?
Correct Answer
(D) private
[#4] What does polymorphism allow in Ruby?
Correct Answer
(A) Objects of different classes to be treated as objects of a common superclass
[#5] What is the primary purpose of a constructor in a Ruby class?
Correct Answer
(D) To initialize instance variables