New answers tagged code-example
0
votes
What is an example of class inheritance in every-day life which is easy to write in an object-oriented language?
This is a harder question than it seems if you want to get across the idea that a type hierarchy should contain variations but with the same interface. If the interface gets extended as you go down ...
- 35.5k
2
votes
What is an example of class inheritance in every-day life which is easy to write in an object-oriented language?
I think that when dealing with new students the principle of inheritance is best explained with analogies to life outside of writing code.
I'm not so sure. I prefer to use application-centric ...
- 463
1
vote
What is an example of class inheritance in every-day life which is easy to write in an object-oriented language?
I've frequently used animals. They share some advantages over cups. First, there are a lot of them. Second, they already come pre-categorized into class trees thanks to hundreds of years of labor by ...
- 32.2k
Top 50 recent answers are included
Related Tags
code-example × 11lesson-ideas × 2
java × 2
object-oriented-paradigm × 2
resource-request × 1
programming × 1
algorithms × 1
introductory-lesson × 1
textbook × 1
python × 1
data-structure × 1
functional-programming × 1
c × 1
computational-thinking × 1
looping × 1
plagiarism × 1
pointers × 1
objects-first × 1