Hello friends, Over lunch today some colleagues discussed a question they are using as a conversation starter in some preliminary chats in our developer hiring process.
The question was: "Place the following three in order: Inheritance, Polymorphism, Encapsulation." They specifically did not define in *what* order, leaving that for the answerer to decide. I responded thus: Encapsulation comes with OO - you get it for free. Polymorphism is a hugely important enabler, but this in itself is enabled by Inheritance, so I put them in this order: Inheritance, Polymorphism, Encapsulation. My colleagues felt that of the three options this was the least satisfactory, and showed a lack of understanding of OO design. One even suggested that one could have polymorphism without inheritance. I'm curious as to your opinions - answer to the question, responses to my answer, and to the feedback from my colleagues. Thanks! S. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor