aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lawrance <[email protected]>2021-10-13 19:38:53 -0700
committerJames Lawrance <[email protected]>2021-10-13 19:38:53 -0700
commitae7d1e5a76290de14cea4576d5e5357893f37098 (patch)
tree5f42aa7d19fd8df453ed297b16b8561b7a334a2a
parentAdd online IDE url (diff)
downloadcst116-lab3-jemersonlawrance-ae7d1e5a76290de14cea4576d5e5357893f37098.tar.xz
cst116-lab3-jemersonlawrance-ae7d1e5a76290de14cea4576d5e5357893f37098.zip
Initial Lab 3 Commit 10/13/21
-rw-r--r--CST116F2021-Lab3/CST116F2021-Lab3.cpp20
-rw-r--r--CST116F2021-Lab3/CST116F2021-Lab3.vcxproj2
-rw-r--r--CST116F2021-Lab3/CST116F2021-Lab3.vcxproj.filters2
-rw-r--r--CST116F2021-Lab3/Lawrance CST116-Lab3.cpp72
-rw-r--r--Lab 3 Output and Work.txt58
5 files changed, 132 insertions, 22 deletions
diff --git a/CST116F2021-Lab3/CST116F2021-Lab3.cpp b/CST116F2021-Lab3/CST116F2021-Lab3.cpp
deleted file mode 100644
index 41af613..0000000
--- a/CST116F2021-Lab3/CST116F2021-Lab3.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-// CST116F2021-Lab3.cpp : This file contains the 'main' function. Program execution begins and ends there.
-//
-
-#include <iostream>
-
-int main()
-{
- std::cout << "Hello World!\n";
-}
-
-// Run program: Ctrl + F5 or Debug > Start Without Debugging menu
-// Debug program: F5 or Debug > Start Debugging menu
-
-// Tips for Getting Started:
-// 1. Use the Solution Explorer window to add/manage files
-// 2. Use the Team Explorer window to connect to source control
-// 3. Use the Output window to see build output and other messages
-// 4. Use the Error List window to view errors
-// 5. Go to Project > Add New Item to create new code files, or Project > Add Existing Item to add existing code files to the project
-// 6. In the future, to open this project again, go to File > Open > Project and select the .sln file
diff --git a/CST116F2021-Lab3/CST116F2021-Lab3.vcxproj b/CST116F2021-Lab3/CST116F2021-Lab3.vcxproj
index a706d70..4526112 100644
--- a/CST116F2021-Lab3/CST116F2021-Lab3.vcxproj
+++ b/CST116F2021-Lab3/CST116F2021-Lab3.vcxproj
@@ -139,7 +139,7 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
- <ClCompile Include="CST116F2021-Lab3.cpp" />
+ <ClCompile Include="Lawrance CST116-Lab3.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
diff --git a/CST116F2021-Lab3/CST116F2021-Lab3.vcxproj.filters b/CST116F2021-Lab3/CST116F2021-Lab3.vcxproj.filters
index 1a7ae88..b2a137b 100644
--- a/CST116F2021-Lab3/CST116F2021-Lab3.vcxproj.filters
+++ b/CST116F2021-Lab3/CST116F2021-Lab3.vcxproj.filters
@@ -15,7 +15,7 @@
</Filter>
</ItemGroup>
<ItemGroup>
- <ClCompile Include="CST116F2021-Lab3.cpp">
+ <ClCompile Include="Lawrance CST116-Lab3.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
diff --git a/CST116F2021-Lab3/Lawrance CST116-Lab3.cpp b/CST116F2021-Lab3/Lawrance CST116-Lab3.cpp
new file mode 100644
index 0000000..a5beedb
--- /dev/null
+++ b/CST116F2021-Lab3/Lawrance CST116-Lab3.cpp
@@ -0,0 +1,72 @@
+
+
+#include <iostream>
+using namespace std;
+
+//5a
+//6.4 Exercises
+//int main()
+//{
+// int a = 0;
+// cout << a++ << endl;
+// cout << ++a << endl;
+// cout << a + 1 << endl;
+// cout << a << endl;
+// cout << --a << endl;
+
+//}
+
+//5a
+//7.2 Exercises
+//int main()
+//{
+// int money = 0;
+// int accounts = 0;
+//
+// cout << "What is your balance?" << endl;
+// cin >> money;
+// cout << "How many accounts do you have open with us?" << endl;
+// cin >> accounts;
+//
+// if (money >= 25000)
+// cout << "Your membership is Platinum";
+// else if (money < 25000 && money > 10000 && accounts == 2)
+// cout << "Your membership is Gold";
+// else if (money > 10000 && accounts == 1)
+// cout << "Your membership is Silver";
+// else if (money <= 10000)
+// cout << "Your membership is Copper";
+//
+// return 0;
+//}
+
+//5b
+//7.4 Exercises
+int main()
+{
+ char menu_selection;
+ cout << "Student Grade Program" << endl;
+ cout << "- Main Menu -" << endl << endl;
+ cout << "1. Enter name\n2. Enter test scores\n3. Display test scores\n9. Exit"
+ << endl << endl;
+ cout << "Please enter your choice from the list above ";
+
+ cin >> menu_selection;
+
+ switch (menu_selection)
+ {
+ case '1':
+ cout << "Enter name";
+ break;
+ case '2':
+ cout << "Enter test scores";
+ break;
+ case '3':
+ cout << "Display test scores";
+ break;
+ case '9':
+ cout << "Exit";
+ break;
+ }
+
+} \ No newline at end of file
diff --git a/Lab 3 Output and Work.txt b/Lab 3 Output and Work.txt
new file mode 100644
index 0000000..4d1ac5b
--- /dev/null
+++ b/Lab 3 Output and Work.txt
@@ -0,0 +1,58 @@
+James Lawrance Lab 3 Output / Work
+---------------------------
+
+5a -
+6.4 Exercises -
+
+0
+2
+3
+2
+1
+
+C:\Users\there\Source\Repos\cst116-lab3-JEmersonLawrance\x64\Debug\CST116F2021-Lab3.exe (process 8936) 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 . . .
+
+7.1 Exercises -
+
+1. int_exp1 => int_exp2
+^ >= is the correct syntax, not =>
+2. int_exp1 = int_exp2
+^ == is the correct syntax, not =
+3. int_exp1 =! int_exp2
+^ != is the correct syntax, not =!
+4. char_exp == "A"
+^ since the variable char_exp is stored as a character, 'A' should be typed instead
+5. int_exp1 > char_exp
+^ characters do not have numerical values, therefore the comparison does not make sense
+6. int_exp1 < 2 && > -10
+^ incorrect syntax, the && can be omitted
+
+7.2 Exercises -
+
+What is your balance?
+11000
+How many accounts do you have open with us?
+1
+Your membership is Silver
+C:\Users\there\Source\Repos\cst116-lab3-JEmersonLawrance\x64\Debug\CST116F2021-Lab3.exe (process 4776) 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 . . .
+
+5b -
+7.4 Exercises -
+
+Student Grade Program
+- Main Menu -
+
+1. Enter name
+2. Enter test scores
+3. Display test scores
+9. Exit
+
+Please enter your choice from the list above 9
+Exit
+C:\Users\there\Source\Repos\cst116-lab3-JEmersonLawrance\x64\Debug\CST116F2021-Lab3.exe (process 19648) 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 . . .