This test is made up of two parts:
Note that marks will be awarded purely on the content of the final report. Therefore, at all stages of the test, please describe your plans, problems encountered, tests carried out and, when the required tasks have been completed, describe any conclusions drawn from the exercise.
The program SERIES.C is supposed to
calculate the equivalent resistance of a set of separate
resistors
,
,
etc. connected in series, according to
the following equation:
The program is currently poorly laid out and formatted, and has various other defects. You are required to:
Decompose the main() function of the program SERIES.C (as corrected in part 1) into a number of separate (sub-)functions which are appropriately invoked by main(). Introduce separate functions for:
Correct any defects manifested in your modified program. Ensure that you test the program severely in an effort to reveal any remaining run time defects.