aboutsummaryrefslogtreecommitdiff
path: root/CST116F2021-Proj3/Pseudocode.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CST116F2021-Proj3/Pseudocode.txt')
-rw-r--r--CST116F2021-Proj3/Pseudocode.txt135
1 files changed, 135 insertions, 0 deletions
diff --git a/CST116F2021-Proj3/Pseudocode.txt b/CST116F2021-Proj3/Pseudocode.txt
new file mode 100644
index 0000000..e60b5eb
--- /dev/null
+++ b/CST116F2021-Proj3/Pseudocode.txt
@@ -0,0 +1,135 @@
+James Lawrance and Kaeden Grubb Project 3 Pseudocode
+----------------------------------------------------
+//Preprocessor/Global (Kaeden)
+<include #iostream>
+
+using namespace std;
+
+
+
+void getMatrices(int matrice1, int matrice2);
+
+void addMatrices(int matrice1, int matrice2);
+
+void multiplyMatrices(int matrice1, int matrice2);
+
+//Menu (Kaeden)
+
+int matrice1[3][3];
+
+int matrice2[3][3];
+
+
+
+main()
+
+{
+
+bool exit = false;
+
+int choice;
+
+while (exit = false)
+
+print menu
+
+cin choice
+
+switch(choice)
+
+case 1:
+
+getMatrices();
+
+case 2:
+
+addMatrices();
+
+case 3:
+
+multiplyMatrices();
+
+case 4:
+
+exit = true;
+
+}
+
+//Get New Matrices (James)
+
+Get User Input starting at Matrix1[0][0], ending at Matrix1[2][2], filling whole array
+Get User Input starting at Matrix2[0][0], ending at Matrix2[2][2], filling whole array
+
+Return to Menu
+
+//Add Matrices (James)
+
+Initialize Float Array "DisplayMatrix" at [3][3]
+
+For loop with counter that terminates once counter is greater than 2, counter increases by 1 each loop
+ For loop with counter2 that terminates once counter2 is greater than 2, counter2 increases by 1 each loop
+ DisplayMatrix[counter][counter2] = Matrix1[counter][counter2] + Matrix2[counter][counter2]
+
+Print Upper Corner Left
+Print Spacing
+Print Upper Corner Right
+
+For loop with counter that terminates once counter is greater than 2, counter increases by 1 each loop
+ Print Spacing
+ For loop with counter2 that terminates once counter2 is greater than 2, counter2 increases by 1 each loop
+ Print DisplayMatrix[counter][counter2]
+ Print Spacing
+ End line
+
+Print Lower Corner Left
+Print Spacing
+Print Lower Corner Right
+
+Return to Menu
+
+//Multiply Matrices (Kaeden)
+
+void multiplyMatrices(int matrice1, int matrice2)
+
+{
+
+int product[3][3];
+
+for (int i = 0, i < 3, i++)
+
+{
+
+for (int j = 0, j < 3, j++)
+
+{
+
+product[i][j] = (matrice1[i][1] * matrice2[j][1]) + matrice1[i][2] * matrice2[j][2]) + matrice1[i][3] * matrice2[j][3]);
+
+}
+
+}
+
+print product;
+
+return;
+
+}
+
+
+
+James:
+
+void getMatrices(int matrice1, int matrice2)
+
+{
+
+}
+
+void addMatrices(int matrice1, int matrice2)
+
+{
+
+}
+
+
+