Object Oriented Software Engineering   View all facts   Glossary   Help
subject > criterion > quality > software quality > coupling > control coupling
Next couplingdata coupling    Upcoupling    Previous couplingcontent coupling   

control coupling
subjectfact 
control couplingcan be reduced by
  • having the callers of the routine directly call the methods called in the second routine
  • the use of polymorphic operations
  • using a look-up table that maps a command to a method that should be called when that command is issued
2001-08-30 14:55:04.0
has definition A form of coupling in which one component affects the sequence of execution in another2001-08-30 14:55:04.0
has example
public routineX(String command)
{
//routineX will have to change whenever any of its callers adds a new command
if (command.equals("drawCircle")
{
drawCircle();
}
else
{
drawRectangle();
}
}
2001-08-30 14:55:04.0
is a subtopic of 9.2 - Principles Leading to Good Design2001-08-30 14:55:04.0
is named after common blocks in the Fortran language which are used to hold global variables2001-08-30 14:55:04.0
is a kind of coupling2001-08-30 14:55:04.0
occurs when one procedure calls another using a 'flag' or 'command' that explicitly controls what the second procedure does2001-08-30 14:55:04.0
couplingimplies that if you want to reuse one component, you will also have to import all the ones with which it is coupled2001-08-30 14:55:07.0
software qualityis hard to assess2001-08-30 14:57:42.0