| Introduction to OOP | Chapter 23: Object Interconnections : | next | previous | audio | real | text |
double todaysDow; | |
class One {
public:
void setDow () {
todaysDow = 9473;
}
};
|
class Two {
public:
void printDow () {
cout << "Today the Dow hit "
<< todaysDow;
}
};
|
Can be mitigated by making a class that ``manages'' the global area, thereby reducing global coupling to component coupling.