Explanations should take around 50 words. Some slack will be given to explanations with more words (however, don't press your luck too many times on this); explanations a page or more long will lose five points.
if
bool then goto
label) as the only control structure?
Explain your answer.
Structured programming imposes a one entry, one exit structure on code. Normally, this is done with with stylized versions of the if and while statements. However, it is straightforward to implement the stylized versions of if and while using conditional gotos, so it is possible to practice structured programming using conditional gotos.
The Law of Demeter restricts the ways in which a method may gain access to an object. An analogous interpretation of the Law of Demeter for functions would restrict the ways in which a function access variables. In particular, programmers would be discouraged from accessing global variables from within procedures, and rely instead on parameters and local variables.
The basic Halstead metrics are
These are all metrics that can be determined by scanning the program text; that is they are static metrics and can be discovered using static analysis techniques.
nopr the number of unique operators used in a program nopn the number of unique operands used in a program Nopr the total number of operators used in a program Nopn the total number of operands used in a program
Unit testing involves testing each unit (procedure, object, module) in isolation after it's been created. Because the unit is tested in isolation, the choice of top down or bottom up implementation exerts no significant influence over unit testing.
This page last modified on 24 March 2000.