Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Some tutorials give silly examples to teach OOP, for example: Car class and myCar object, etc. Is that way considered bad in learning OOP assuming that these examples not applied to real programming problems?

share|improve this question

closed as not constructive by gnat, Martijn Pieters, Walter, Glenn Nelson, Blrfl Jan 10 '13 at 12:56

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

Cars, animal speciies and drawing shapes are real problems, they may not be yours. I think using the example of 'Silly Walks' would make a great tutorial. –  JeffO Jan 10 '13 at 18:01
add comment

1 Answer

up vote 3 down vote accepted

No. To be able to teach the various concepts in relative isolation, you have to use extremely simplified examples.

Using real programming problems is not really an option, because the students would just be overwhelmed by the complexity and the number of new things coming at then at once.

share|improve this answer
I agree. If you want to teach about UML class diagrams, you show a diagram with a few classes, not a real-world diagram with > 100 classes. –  Giorgio Jan 10 '13 at 12:57
agree, though I'd add that the student needs to use the concepts in a real project to fully understand. –  jk. Jan 10 '13 at 13:02
I disagree with this very much. The "MyCar.Start" and "Animal.Eat" examples have done a lot of damage to the understanding of the concept. –  Jas Jan 11 '13 at 6:04
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.