Python Dates and Times in Python Let's Build a Timed Quiz App The Question Classes & the Plan

Carlos Caro
Carlos Caro
9,528 Points

Would it make sense to have only one class with Add and Multiply as methods of the Question class?

I understand that Kenneth is trying to show the value of inheritance but I am wondering if it is really necessary to have 3 classes when I believe this could be only one class with 3 methods

1 Answer

Dongfeng Gu
Dongfeng Gu
12,269 Points

To my point of view, it doesn't make sense that if we define Add and Multiply as method of the Question Class, because every instance of Question (question1, question2, question3...) will have every question method of Question Class, this will make instance of Question more like a general Question not a specific question.