aboutsummaryrefslogtreecommitdiff
path: root/Ch 5 Debugging Project
diff options
context:
space:
mode:
authorHannah Wu <[email protected]>2022-10-11 21:09:04 -0700
committerHannah Wu <[email protected]>2022-10-11 21:09:04 -0700
commit28585c759a375fff1b4246a17db97f29b0009546 (patch)
tree72de2a38d3f4fb2b760379873e96323b887a69a9 /Ch 5 Debugging Project
parentDeleted old files. Replaced old files. (diff)
downloadcst116-lab0-debugging-wu-main.tar.xz
cst116-lab0-debugging-wu-main.zip
Added answers to top of program. Corrected program. Added output textfile. Added pseudocode text file.HEADmain
Diffstat (limited to 'Ch 5 Debugging Project')
-rw-r--r--Ch 5 Debugging Project/Ch 5 Debugging Project Pseudocode.txt5
-rw-r--r--Ch 5 Debugging Project/Ch 5 Debugging Project.cpp4
-rw-r--r--Ch 5 Debugging Project/Ch 5 Debugging Project.txt6
-rw-r--r--Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/CL.command.1.tlogbin1890 -> 2854 bytes
-rw-r--r--Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/CL.read.1.tlogbin41552 -> 61920 bytes
-rw-r--r--Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/CL.write.1.tlogbin1526 -> 2328 bytes
-rw-r--r--Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/Ch 5 Debugging Project.lastbuildstate2
-rw-r--r--Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/link.command.1.tlogbin3310 -> 5004 bytes
-rw-r--r--Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/link.read.1.tlogbin7502 -> 11134 bytes
-rw-r--r--Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/link.write.1.tlogbin1686 -> 2568 bytes
-rw-r--r--Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.exebin53760 -> 53760 bytes
-rw-r--r--Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.exe.recipe2
-rw-r--r--Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.ilkbin507004 -> 524548 bytes
-rw-r--r--Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.objbin83784 -> 83780 bytes
-rw-r--r--Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.pdbbin1822720 -> 2068480 bytes
-rw-r--r--Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.vcxproj.FileListAbsolute.txt1
-rw-r--r--Ch 5 Debugging Project/NewFile0
-rw-r--r--Ch 5 Debugging Project/TextFile1.txt7
18 files changed, 17 insertions, 10 deletions
diff --git a/Ch 5 Debugging Project/Ch 5 Debugging Project Pseudocode.txt b/Ch 5 Debugging Project/Ch 5 Debugging Project Pseudocode.txt
new file mode 100644
index 0000000..265a0ac
--- /dev/null
+++ b/Ch 5 Debugging Project/Ch 5 Debugging Project Pseudocode.txt
@@ -0,0 +1,5 @@
+SET MONEY=123.45
+IF RAISE input=!0 THEN set value of RAISE
+ SET N= MONEY*RAISE
+ OUTPUT= MONEY+N
+PRINT OUTPUT \ No newline at end of file
diff --git a/Ch 5 Debugging Project/Ch 5 Debugging Project.cpp b/Ch 5 Debugging Project/Ch 5 Debugging Project.cpp
index 6545e9b..4058c23 100644
--- a/Ch 5 Debugging Project/Ch 5 Debugging Project.cpp
+++ b/Ch 5 Debugging Project/Ch 5 Debugging Project.cpp
@@ -25,6 +25,7 @@
* line.
* 10) Step over the next cout statement. Now look at the console
* window. What was printed?
+* A: Nothing. After ignoring all the cout statements there is nothing printed.
* 11) Select Stop Debugging either from the Debug menu or from your
* toolbar.
*
@@ -43,6 +44,7 @@
* red. This designates that the variable just changed its value.
* 9) What happened to our money? I thought a raise was supposed
* to increase our money? Stop debugging and fix the calculation.
+* A: Original calculation is money*raise. Change to money+(money*raise) to get the correct calculation.
*
* Debugging Exercise 3
*
@@ -76,7 +78,7 @@ int main()
cout << "Enter percent raise: ";
cin >> raise;
- money = money * raise;
+ money = money + (money*raise);
cout << "After your raise you have $";
cout << money << endl;
diff --git a/Ch 5 Debugging Project/Ch 5 Debugging Project.txt b/Ch 5 Debugging Project/Ch 5 Debugging Project.txt
new file mode 100644
index 0000000..71b6665
--- /dev/null
+++ b/Ch 5 Debugging Project/Ch 5 Debugging Project.txt
@@ -0,0 +1,6 @@
+You have $123.45
+Enter percent raise: 0.1
+After your raise you have $135.795
+
+C:\Users\hanna\Source\Repos\cst116-lab0-debugging-Wu\Ch 5 Debugging Project\Debug\Ch 5 Debugging Project.exe (process 25540) exited with code 0.
+Press any key to close this window . . . \ No newline at end of file
diff --git a/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/CL.command.1.tlog b/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/CL.command.1.tlog
index b32ebb5..38db4e7 100644
--- a/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/CL.command.1.tlog
+++ b/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/CL.command.1.tlog
Binary files differ
diff --git a/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/CL.read.1.tlog b/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/CL.read.1.tlog
index 9be583f..7e51ca9 100644
--- a/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/CL.read.1.tlog
+++ b/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/CL.read.1.tlog
Binary files differ
diff --git a/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/CL.write.1.tlog b/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/CL.write.1.tlog
index e2dcabf..a0331d7 100644
--- a/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/CL.write.1.tlog
+++ b/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/CL.write.1.tlog
Binary files differ
diff --git a/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/Ch 5 Debugging Project.lastbuildstate b/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/Ch 5 Debugging Project.lastbuildstate
index f13b9e7..54cb635 100644
--- a/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/Ch 5 Debugging Project.lastbuildstate
+++ b/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/Ch 5 Debugging Project.lastbuildstate
@@ -1,2 +1,2 @@
PlatformToolSet=v143:VCToolArchitecture=Native32Bit:VCToolsVersion=14.33.31629:TargetPlatformVersion=10.0.19041.0:
-Debug|Win32|C:\Users\hanna\Source\Repos\cst116-lab0-debugging-HJCST\Ch 5 Debugging Project\|
+Debug|Win32|C:\Users\hanna\Source\Repos\cst116-lab0-debugging-Wu\Ch 5 Debugging Project\|
diff --git a/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/link.command.1.tlog b/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/link.command.1.tlog
index acb15f4..ff93cc3 100644
--- a/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/link.command.1.tlog
+++ b/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/link.command.1.tlog
Binary files differ
diff --git a/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/link.read.1.tlog b/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/link.read.1.tlog
index 030cbcf..7b1cae3 100644
--- a/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/link.read.1.tlog
+++ b/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/link.read.1.tlog
Binary files differ
diff --git a/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/link.write.1.tlog b/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/link.write.1.tlog
index 20f0112..527177f 100644
--- a/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/link.write.1.tlog
+++ b/Ch 5 Debugging Project/Debug/Ch 5 Deb.57683855.tlog/link.write.1.tlog
Binary files differ
diff --git a/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.exe b/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.exe
index 498dda8..bc5f5bb 100644
--- a/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.exe
+++ b/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.exe
Binary files differ
diff --git a/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.exe.recipe b/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.exe.recipe
index d026c61..08eb3e9 100644
--- a/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.exe.recipe
+++ b/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.exe.recipe
@@ -2,7 +2,7 @@
<Project>
<ProjectOutputs>
<ProjectOutput>
- <FullPath>C:\Users\hanna\Source\Repos\cst116-lab0-debugging-HJCST\Ch 5 Debugging Project\Debug\Ch 5 Debugging Project.exe</FullPath>
+ <FullPath>C:\Users\hanna\Source\Repos\cst116-lab0-debugging-Wu\Ch 5 Debugging Project\Debug\Ch 5 Debugging Project.exe</FullPath>
</ProjectOutput>
</ProjectOutputs>
<ContentFiles />
diff --git a/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.ilk b/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.ilk
index d0d0bea..d634618 100644
--- a/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.ilk
+++ b/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.ilk
Binary files differ
diff --git a/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.obj b/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.obj
index f145f4c..19904bd 100644
--- a/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.obj
+++ b/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.obj
Binary files differ
diff --git a/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.pdb b/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.pdb
index cf5b753..25c242c 100644
--- a/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.pdb
+++ b/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.pdb
Binary files differ
diff --git a/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.vcxproj.FileListAbsolute.txt b/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.vcxproj.FileListAbsolute.txt
index 7a25d0e..6759b3a 100644
--- a/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.vcxproj.FileListAbsolute.txt
+++ b/Ch 5 Debugging Project/Debug/Ch 5 Debugging Project.vcxproj.FileListAbsolute.txt
@@ -1,2 +1,3 @@
C:\Users\martha.chamberlin\source\repos\Ch 5 Debugging Project\Debug\Ch 5 Debugging Project.exe
C:\Users\hanna\Source\Repos\cst116-lab0-debugging-HJCST\Ch 5 Debugging Project\Debug\Ch 5 Debugging Project.exe
+C:\Users\hanna\Source\Repos\cst116-lab0-debugging-Wu\Ch 5 Debugging Project\Debug\Ch 5 Debugging Project.exe
diff --git a/Ch 5 Debugging Project/NewFile b/Ch 5 Debugging Project/NewFile
deleted file mode 100644
index e69de29..0000000
--- a/Ch 5 Debugging Project/NewFile
+++ /dev/null
diff --git a/Ch 5 Debugging Project/TextFile1.txt b/Ch 5 Debugging Project/TextFile1.txt
deleted file mode 100644
index c01f008..0000000
--- a/Ch 5 Debugging Project/TextFile1.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-You have $123.45
-Enter percent raise: .15
-After your raise you have $18.5175
-
-C:\Users\hanna\Source\Repos\cst116-lab0-debugging-HJCST\Ch 5 Debugging Project\Debug\Ch 5 Debugging Project.exe (process 18428) exited with code 0.
-To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
-Press any key to close this window . . . \ No newline at end of file