When I run my dog I count critters.  I can identify some of them.  And
so developed a taxonomy counter  in python.  Incrementing one of these
objects also  increments all those above  it.  Thus if we  find a frog
I'd increment the animal object;  on finding a skunk we'd go elsewhere
before incrementing "mammal".  Home again I'd read 2 animal, 1 mammal,
0 all else.   I suppose I used a registration  technique in the python
object initializer.  Solutions in j please?

The interface includes construct structure, modify any of the objects,
report correctly.


              animal

   bird       reptile         mammal
              /   \         /   |   \
            snake newt   deer rabbit squirrel


Related, has anyone written Design Patterns in j?  Thanks, Dave.

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to