Better to extend a class or modify it directly?
Posted
by primehunter326
on Stack Overflow
See other posts from Stack Overflow
or by primehunter326
Published on 2010-04-28T16:21:10Z
Indexed on
2010/04/28
16:23 UTC
Read the original article
Hit count: 184
Hi,
So I'm working on creating a visualization for a data structure in Java. I already have the implementation of the data structure (Binary Search Tree) to start with, but I need to add some additional functionality to the included node class. As far as conventions and best practices are concerned, should I create a subclass of the node with this added functionality or should I just modify what I have and document it there?
My question is similar to what's asked here but that's a little over my head.
I know it probably doesn't matter much for what I'm doing, so I'm asking this more as a general thing.
© Stack Overflow or respective owner