As indicated, the first step in the assignment is for the student to read the processing specifications and to compute the intended results. The typical solution is traditional, with pencil and paper, but you can facilitate the process with an Excel worksheet. Regardless, however, of how the student determines the anticipated output, computation of the output does several things:
- It confirms for both student and instructor the desired result of the COBOL program. The student knows the intended result and the instructor has an invaluable aid in grading the projects.
- It eliminates any ambiguities that might exist in the specifications and/or clarifies the intended result of more complicated specifications.
- It reinforces material learned in an earlier class; moreover the concept is applicable to programming in any language.
Once the class is introduced to Excel, the next question is inevitably "If I can do this in 10 minutes in Excel, why do I need two weeks to write a COBOL program?" The answer in a word is the I/O capability that is built into COBOL to process large files, which far exceeds the capability of a spreadsheet. Of course not every project is amenable to a solution by Excel, but you will be pleasantly surprised at how many fit. More advanced projects will require the Excel IF, VLOOKUP, and SUBTOTAL functions, but students enjoy this review.