Sample Output Documentation Requirements
Sample output is required most programs. Sample output should be copied and pasted as a block comment after the closing brace of the main function.
If multiple runs of the program are required, separate the runs with a blank line and the run number. Usually the assignment will have an example of the sample output and will probably have Run 1 followed by the first run of the program and then Run 2 followed by the second run of the program and so on. The Run 1 and Run 2 are not part of the program and should not be generated by the source code. Run 1 and Run 2 can be added to the sample output OR three or four blank lines can inserted between the runs and Run 1 and Run 2 can be omitted.
For example if the assignment requires three runs of the program and has this for sample output:
Run 1
Enter the cost of the item : $245.76
The cost is
$245.76
Press any key to continue
Run 2
Enter the cost of the item : $1456.77
The cost is $1456.77
Press any key to continue
Run 3
Enter the cost of the item : $12500
The cost is $12500
Press any key to continue
I expect the sample output to either look like this :
/*
Run 1
Enter the cost of the item : $245.76
The cost is $245.76
Press any key to continue
Run 2
Enter the cost of the item : $1456.77
The cost is $1456.77
Press any key to continue
Run 3
Enter the cost of the item : $12500
The cost is $12500
Press any key to continue
*/
Or like this:
/*
Enter the cost of the item : $245.76
The cost is $245.76
Press any key to continue
Enter the cost of the item : $1456.77
The cost is $1456.77
Press any key to continue
Enter the cost of the item : $12500
The cost is $12500
Press any key to continue
*/
functions in C++
Short description of what the function is intended to accomplish.
Any preconditions - Conditions that must be true for the function to work as expected.
Post conditions - Changes in the calling function other than what is returned by the function.
Expected framework for a function's IDOC
//Desc -
//Pre -
//Post -
even numbered stations answer these questions.
odd numbered stations answer these questions.
Updated: Saturday, January 12, 2008 8:56 PM