Popis: |
Due to the increasing complexity of modern software code, we need ways of effectively measuring the difficulty of programs to detect problem code during development. Program metrics [Conte, 86] are a partial answer to this need. They offer us various ways of measuring the length, modularity, nesting, and data flow of software.The Prather metric, developed by Ronald E. Prather [Prather, 84], is a statement structure metric which measures statement nesting and control structures as a function of the simple statements they contain. For our research, we developed a program2 which takes Pascal programs as input and returns the Prather measures of the programs.Our project was to examine the Prather metric by comparing it with the Statement Count and McCabe measures, both are commonly used metrics, and see if there was a relationship between Prather and the other measures. If there is a correlation, this would show that Prather is not truly a unique measure, but it contains aspects of Statement Count or McCabe's measure.We also examined the use of the Prather metric as a cheating checker on student programs. We found that Prather may be better at picking out possible cheaters than Statement Count and McCabe's measure. We concluded that this was due to the nature of the Prather metric: it includes aspects of statement count and number of paths plus a measure of nesting. |