This problem of Split Counters is an expansion of the Counter problem. The main thing we have to do is to create a new class called DivisorCount which will be a subclass of Count. For OddCount and EvenCount, we can use instances of IntegerCount, where IntegerCount is an already declared subclass of Count.

Count : I am a Count. I know my value and my resetValue. I can increment, decrement and reset. I have two subclasses -IntegerCount and DivisorCount.

IntegerCount : I am an IntegerCount. I can count integers. I know my value. I can increment, decrement, reset and represent a number in any base (not necessary for this program).

DivisorCount : I am a DivisorCount. I am a subclass of Count. I know my Value. I can increment, decrement and reset. When my Value is odd, I send a message to OddCount to increment or decrement. When my Value is even, I send a message to EvenCount to increment or decrement. When I reset, I send a message to both OddCOunt and EvenCount to reset theier values and also reset my value to 0.

In this program, there will be two instances of IntegerCount -OddCount and EvenCount. These will receive a message to increment, decrement or reset from DivisorCount.