Indeed! Inheritance is an occasional thing and finding good succinct examples is hard. However the example isn't quite as bad as a first glance may suggest. The virtue in providing derived classes here is that you don't have to repeat the same list of values if you want to use the same object type in multiple places. There are however many other ways much the same result could be could be achieved that don't require OO let alone inheritance.
In reply to Re^2: Not quite an OO tutorial
by GrandFather
in thread Not quite an OO tutorial
by GrandFather
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |