aboutsummaryrefslogtreecommitdiff
path: root/CST 126/Homework 1/menu.hpp
diff options
context:
space:
mode:
authorarthurtspears <[email protected]>2024-04-20 11:16:36 -0700
committerGitHub <[email protected]>2024-04-20 11:16:36 -0700
commit659a1f12d935130bf8da4fe14165e4f421ac7c18 (patch)
treecebf8ee2c18c8e0aa4cf5fc4630a8005164b068d /CST 126/Homework 1/menu.hpp
parentAdded helpers.h file. (diff)
downloadhomework-1-arthurtspears-develop.tar.xz
homework-1-arthurtspears-develop.zip
Adding basic unit tests to Solution (#2)HEADdevelop
* all work up until inclass practice * Added Unit Tests Project * Added second unit tests project as example. * Bring up to date for merge
Diffstat (limited to 'CST 126/Homework 1/menu.hpp')
-rw-r--r--CST 126/Homework 1/menu.hpp55
1 files changed, 55 insertions, 0 deletions
diff --git a/CST 126/Homework 1/menu.hpp b/CST 126/Homework 1/menu.hpp
new file mode 100644
index 0000000..31c9777
--- /dev/null
+++ b/CST 126/Homework 1/menu.hpp
@@ -0,0 +1,55 @@
+#ifndef MENU_H
+#define MENU_H
+
+#include <iostream>
+#include "GuessingGame.hpp"
+
+using std::cout;
+using std::cin;
+using std::endl;
+
+inline void DisplayMenu(const int& value) {
+
+ cout << "***************************************************************" << endl;
+ cout << "Welcome to the menu!\n";
+ cout << "1. Currency Converter\n";
+ cout << "2. Guessing Game\n";
+ cout << "3. Temperature Logger\n";
+ cout << "5. Exit\n";
+ cout << endl;
+ cout << "Please pick a number for your choice: ";
+}
+
+inline void Worker() {
+
+ int input = 0;
+
+ DisplayMenu(input);
+
+ cout << input;
+
+ cin >> input;
+
+ while (input != 5)
+ {
+ switch (input) {
+ case 1:
+ //Call Currency Function
+ break;
+ case 2:
+ //Call Guessing Game Function
+ OutputRandomNumber();
+ break;
+ case 3:
+ //Call Temperature Logger
+ break;
+ default:
+ cout << "\nInvalid option, please pick again..\n";
+ }
+
+ DisplayMenu(input);
+
+ cin >> input;
+ }
+}
+#endif \ No newline at end of file