Reports for 577/477
Laboratory preparation
The laboratory portion of this course has an “open” format: you can work on your laboratory exercise whenever the building is open. However, there are fewer laboratory stations than students in the course, so preparing for your time in the laboratory is necessary.
Code documentation
Place a comment block at the beginning of every function (including main()
). This should include: the function name, the purpose of the function, and a list of all parameters, including direction of information transfer (into this routine, out from the routine back to the calling routine, or both), and their purposes. Be sure to include your name in the header of the main program.
Indent bodies of functions, loops and if
statements, and do so with a consistent style.
Use comments! The comments should describe what is happening, how it is being done, what parameters mean, and any restrictions or bugs. Comments should not state what is obvious from the source code; they should be succinctly informative about the purpose of the code. Short comments should be what (comments, such as ”mean value”) rather than how (comments such as “sum of values divided by n”).
Reports
Laboratory reports should be prepared in LaTeX from the template here. For getting starting with LaTeX, see this tutorial. The report should be brief, consisting of the following sections.
- Description Briefly describe the major tasks performed by the program, including any limitations in the program’s capability. Explain the functions of the main program and of each subfunction. Graph the hierarchical structure, showing how functions are called and how in turn further functions are called. Explain any algorithms.
- Testing State precisely the complete procedure for testing the program. The tests should not be unnecessarily extensive, but should be adequate to confirm that all major functions perform correctly. A code tester will attempt to follow your test procedure exactly. Each step should be explained with enough detail that someone knowing nothing about the experiment could carry it out. For each step, state what results should occur. For example, state what keyboard or electrical inputs should be applied, and how when and what outputs should be observed to confirm the program function. If the results are not as desired, state what they should be.
- Results Briefly discuss the results of your experiment. State how successfully the program runs, noting any unsolved problems. Answer any specific questions suggested in the assignment. Suggest possible improvements, such as extensions to the program beyond what is required, that might be made with more time.
-
Source listing Include a listing of the contents of the source file (
main.c
).
Submission
The written report and the code source should both be submitted via Moodle.
Your source code (main.c
file) will be executed as part of the grading process.