I am creating an object that implements quite a few interfaces. My problem is that there are a couple of variables that all the interfaces need access to. I know that I could put these variables in a module or shared class, but that is generally a sign of poor OOP design.

Is there any way that I could implement this without using global variables?

Here is a sample of the layout of the object. In the sample the Interfaces need to be able to get what the CurrentIndex is, but I don't want them to be able to change it at all. It should only be writeable from MainObject.

VB Code:
  1. Public Interface MainObject
  2. ReadOnly Property CurrentIndex as Integer
  3. ReadOnly Property If1 as Interface1
  4. ReadOnly Property If2 as Interface2
  5. ReadOnly Property If3 as Interface3
  6.  
  7. Function SetCurrentIndex(index as Integer)
  8.  
  9. End Interface
  10.  
  11. Public Interface Interface1
  12.     ReadOnly Property P1 as Something
  13.     ReadOnly Property P2 as Something
  14.     ReadOnly Property P3 as Something
  15.     ReadOnly Property P4 as Something
  16.  
  17.     Function F1(ST as Something) As Something
  18.     Function F3(ST as Something) As Something
  19.     Function F2(ST as Something) As Something
  20. End Interface
  21.  
  22. Public Interface Interface2
  23.     ReadOnly Property P1 as Something
  24.     ReadOnly Property P2 as Something
  25.     ReadOnly Property P3 as Something
  26.     ReadOnly Property P4 as Something
  27.  
  28.     Function F1(ST as Something) As Something
  29.     Function F3(ST as Something) As Something
  30.     Function F2(ST as Something) As Something
  31. End Interface
  32.  
  33. Public Interface Interface3
  34.     ReadOnly Property P1 as Something
  35.     ReadOnly Property P2 as Something
  36.     ReadOnly Property P3 as Something
  37.     ReadOnly Property P4 as Something
  38.  
  39.     Function F1(ST as Something) As Something
  40.     Function F3(ST as Something) As Something
  41.     Function F2(ST as Something) As Something
  42. End Interface