If you combine the two classes you will violate some of the basic principals of object oriented development, which is that objects should be loosely coupled and be cohesive.
Why not write a simple driver program that instantiates the first class, which subsequently returns the count. The driver can then the instantiate the second class, passing the count as a parameter.
Regards
Martyn
|