Object Oriented Software Engineering   View all facts   Glossary   Help
subject > problem > defect > defect in an ordinary algorithm > performing a calculation in the wrong part of a control construct
Next defect in an ordinary algorithmuse of an inappropriate standard algorithm    Updefect in an ordinary algorithm    Previous defect in an ordinary algorithmoperator precedence error   

performing a calculation in the wrong part of a control construct
subjectfact 
performing a calculation in the wrong part of a control constructhas definition A common defect in which the program performs an action when it should not, or does not perform an action when it should2001-08-30 14:56:58.0
has testing strategy
  • design tests that execute each loop zero times, exactly once, and more than once
  • ensure that anything 'bad' or 'unusual' that could happen while looping is made to occur on the first iteration and the last iteration
2001-08-30 14:56:58.0
is a subtopic of 10.3 - Defects in Ordinary Algorithms2001-08-30 14:56:58.0
is typically caused by inappropriately excluding the action from, or including the action in, a loop or if-then-else construct2001-08-30 14:56:58.0
is a kind of defect in an ordinary algorithm2001-08-30 14:56:58.0
may not be caught using black-box testing, so glass-box testing or inspections may be more effective2001-08-30 14:56:58.0
defecthas example the absence of code to handle an exception2001-08-30 14:55:12.0
problemhas solution which will normally entail developing software, although you may decide that it is better to purchase software or to develop a non-software solution2001-08-30 14:57:03.0
should be written as a simple problem statement in one or two sentences2001-08-30 14:57:03.0