For this program, your output will have to adhere exactly to the samples. I will be using the diff utility to check your output. To ensure your perfect grade, I suggest you run diff on your output and the samples provided. That should catch any little error.
1.Program Documentation:
a. Main: please include the documentation as specified by Dr. Stapleton. .Note that this could be put into a readme file if you wish, but must be included in your program documents.
b. .h files: Include your name and file name. Include an explanation of the class and what it does (see Dr. Stapleton’s .h file example) I prefer putting here information that would be useful to someone wishing to use the class, eg functional description, invariants, return values, etc. However, Dr. Stapleton’s example puts this into the cpp file, so that’s ok too.
c. .cpp files: Dr. Stapleton puts the functions’ functional description, invariants, io description, return values, etc in the .cpp file. This is acceptable. I prefer it in the .h file, so that would also be acceptable. But you must include this information. See Dr Stapleton’s examples. Pseudo code must be included in the .cpp file with each function. For this program, I want it in a comment block just above the function definition (not in it). Also, you need to provide in-line code. This could be excerpted from your pseudo code. (Or a copy that you code around)
d. There will be further requirements posted on the web.
2. Program Input: data file will be provided as a command-line argument, as in prog 1.
3. Program Output:
a. Output filename: output should be directed to a file titled “inputfilename.out”. Note that you will not use “inputfilename” but the name passed in as the command-line argument. Each run will have its own output file.
b. Output must follow the following guidelines:
i. Instructions:
1. Insert: should output on success: “I VALUE: success” Or on failure: “I VALUE: duplicate record”
2. Delete: on success: “D VALUE: success” or on failure: “D VALUE: record not found”
3. Search: on success: “S VALUE: success” or on failure: “S VALUE: record not found”
4. Print: “Print: VALUE, TESTBITPLACE; VALUE, TESTBITPLACE; etc…\n”
ii. Bad input:
1. Too few parameters (eg, I ): “I: too few parameters”
2. Too many parameters (eg I 4 4 4): “I: too many parameters”
3. Invalid command (eg Q 34, Q, 34 I): “Q: invalid command”
4. Blank line: ignore
5. Invalid value (eg I 4R): “I 4R: invalid record value”
c. There must not be any blank lines or other unexpected whitespace.
I hope I have covered everything.
Lawrence