summaryrefslogtreecommitdiff
path: root/CST116-Ch11-Debugging/CST116-Ch11-Debugging-Pseduocode-Preston.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CST116-Ch11-Debugging/CST116-Ch11-Debugging-Pseduocode-Preston.txt')
-rw-r--r--CST116-Ch11-Debugging/CST116-Ch11-Debugging-Pseduocode-Preston.txt57
1 files changed, 57 insertions, 0 deletions
diff --git a/CST116-Ch11-Debugging/CST116-Ch11-Debugging-Pseduocode-Preston.txt b/CST116-Ch11-Debugging/CST116-Ch11-Debugging-Pseduocode-Preston.txt
new file mode 100644
index 0000000..0e11d43
--- /dev/null
+++ b/CST116-Ch11-Debugging/CST116-Ch11-Debugging-Pseduocode-Preston.txt
@@ -0,0 +1,57 @@
+const int employees = 20
+const int max = 21
+
+ReadData(ifstream& inFile, ofstream& outFile, char name[][MAX], int age[])
+WriteOutputFile(ofstream& outFile, char name[][MAX], int age[], int counter)
+PrintTotalsAndSummary(ofstream& out, int totalRecords)
+
+main ()
+ char name[employee][max]
+ int age[employee]
+ int record count(0)
+
+ stream infile
+
+ ofstream outfile(directory)
+ infile open(directory)
+
+ if infile is open
+ record count = readData()
+ close infile
+
+ if outfile is open
+ WriteOutputFile()
+ PrintTotalsandSummary()
+ close outfile
+ else
+ print toruble oepening output file
+ print exiting now
+ else
+ print trouble opening input file
+ print exiting now
+ return
+
+int readData()
+ int counter
+ infile to name[counter] to age[counter]
+
+ while infile is not at end of file
+ print name[counter]
+ print age[counter]
+ infile to name[counter] to age[counter]
+
+ return counter
+
+WriteOutputFile()
+ print to outfile here is the output file
+ for int r = 0, r <= counter, r++
+ outfile print name
+ outfile print age
+
+PrintTotalsandSummary()
+ to screen
+ print total records: totalrecords
+
+ to file
+ outfile total records: totalrecords
+