This is a continuation of:
I asked how you implement the Comparable interface into a class. The answer that I received was correct, but now i have a new (similar) question.
You see, i am building a tree data structure containing "dogs". So, i needed to incorporate a comparable "function" into my "dog" class.
The problem is that, i am not building only one tree structure, i am making 2.
One of my trees is a red black tree that should be built completely off of the dog's name, and the answer in the other question addressed this.
However, my other data structure is built by using a different "Comparable" feature of "dog" -- that is, I need to be able to compare the dogCOUNT.
So, basically what I am asking is: say i have a class, called Dog. How do i go about implementing a Comparable subclass that will compare based off names, if specified to do so, or based off of dogCOUNT, if specified to do so.
I assume that the method signatures would have to be different, but I dont know how to do this.