summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Traver <[email protected]>2022-11-09 23:06:35 -0800
committerJoe Traver <[email protected]>2022-11-09 23:06:35 -0800
commit3abf7966e5046228d30bed7db9cab5a350196754 (patch)
tree83b65148aa743de0b95186cd0acbd8da30d18db3
parentAdded error output and note of confusion (diff)
downloadcst116-ch11-debugging-joetraver30-3abf7966e5046228d30bed7db9cab5a350196754.tar.xz
cst116-ch11-debugging-joetraver30-3abf7966e5046228d30bed7db9cab5a350196754.zip
Added pseudo code
-rw-r--r--CST116-Ch11-Debugging.sln1
-rw-r--r--CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp4
-rw-r--r--CST116_Ch11_Debugging_Pseudo_Code.txt31
3 files changed, 34 insertions, 2 deletions
diff --git a/CST116-Ch11-Debugging.sln b/CST116-Ch11-Debugging.sln
index b60b31b..e08e371 100644
--- a/CST116-Ch11-Debugging.sln
+++ b/CST116-Ch11-Debugging.sln
@@ -8,6 +8,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{30090A24-EA34-48A8-AB5F-5737C5F786BE}"
ProjectSection(SolutionItems) = preProject
Program_output.txt = Program_output.txt
+ CST116_Ch11_Debugging_Pseudo_Code.txt = CST116_Ch11_Debugging_Pseudo_Code.txt
Error_program_output.txt = Error_program_output.txt
EndProjectSection
EndProject
diff --git a/CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp b/CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp
index ade508a..54ca382 100644
--- a/CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp
+++ b/CST116-Ch11-Debugging/CST116-Ch11-Debugging.cpp
@@ -1,5 +1,5 @@
/********************************************************************
-* File: Chapter 11 Debug.cpp
+* File: CST116_Ch11_Debug_traver.cpp
*
* General Instructions: Complete each step before proceeding to the
* next.
@@ -85,7 +85,7 @@ int main()
// Notice how this automatically opens the file
ofstream outFile("C:\\TEMP\\Chap_11_Report.txt");
- inFile.open("C:\\TEMP\\Chap_11_data_IT.txt");
+ inFile.open("C:\\TEMP\\Chap_11_data_JT.txt");
if (inFile.is_open())
{
diff --git a/CST116_Ch11_Debugging_Pseudo_Code.txt b/CST116_Ch11_Debugging_Pseudo_Code.txt
new file mode 100644
index 0000000..c1c92c0
--- /dev/null
+++ b/CST116_Ch11_Debugging_Pseudo_Code.txt
@@ -0,0 +1,31 @@
+Direcitve-
+ Read external file data and write data to new file with a total entry count
+
+
+Functions needed:
+
+ function_1 (read data)
+
+ get data and store to memory from the desired file until end of file is reached
+
+ function_2 (write data)
+
+ write and format data to a different file as a report
+
+ function_3 (print data)
+
+ add footnote of total records in file to the file and user prompt window
+
+Program layout
+
+ open the input file to read the data
+
+ check to ensure the file has been opened and create failsafe prompts to end code if it cannot be achieved
+
+ function_1
+
+ check to ensure the output file is opern and create failsafe promts to end code if it cannot be opened
+
+ function_2
+
+ function_3