Introduction to OOP Chapter 23: Object Interconnections : next previous audio real text

Global Data Coupling



		double todaysDow;


class One {
public:
  void setDow () {
    todaysDow = 9473;		
  }
};


class Two {
public:
  void printDow () {
    cout << "Today the Dow hit "
      << todaysDow;
  }
};

Two or more classes that interact through a common global variable. Again, makes it difficult to understand a single class in insolation.

Can be mitigated by making a class that ``manages'' the global area, thereby reducing global coupling to component coupling.

Intro OOP, Chapter 23, Slide 08