aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrPatrickWarner <[email protected]>2024-04-20 11:05:44 -0700
committerrPatrickWarner <[email protected]>2024-04-20 11:05:44 -0700
commit7f537fed56a4e90d16a89cf84b5fc2511ad64827 (patch)
tree8bae32b126c864b5f2a78427262fdb8d01a9f1a4
parenttemplog virtuallycomplete (diff)
downloadhomework-1-reecepwarner-feature/unit+tests.tar.xz
homework-1-reecepwarner-feature/unit+tests.zip
minor changes and tidying upfeature/unit+tests
-rw-r--r--CST 126/Homework 1/GuessingHelper.hpp3
-rw-r--r--CST 126/Homework 1/Helper.hpp1
-rw-r--r--CST 126/Homework 1/TempLogHelper.hpp11
-rw-r--r--CST 126/Homework 1/main.cpp5
4 files changed, 13 insertions, 7 deletions
diff --git a/CST 126/Homework 1/GuessingHelper.hpp b/CST 126/Homework 1/GuessingHelper.hpp
index 6dd35c3..1d12971 100644
--- a/CST 126/Homework 1/GuessingHelper.hpp
+++ b/CST 126/Homework 1/GuessingHelper.hpp
@@ -6,7 +6,6 @@
int RandomNumberGenerator(const int& LowerBound, const int& UpperBound);
void GuessingGame();
-
int RandomNumberGenerator(const int& LowerBound, const int& UpperBound)
{
std::random_device dev;
@@ -29,7 +28,7 @@ void GuessingGame()
system("cls");
if (UserGuess == GoldenSnitch)
{
- std::cout << "\033[32mHooray! YOU WON!!!!$$$$\033[0m" << "It took you #" << NumberOfGuesses << " Tries!!!" << std::endl;
+ std::cout << "\033[32mHooray! YOU WON!!!!$$$$\033[0m" << " It took you #" << NumberOfGuesses << " Tries!!!" << std::endl;
return;
}
if (UserGuess < GoldenSnitch)
diff --git a/CST 126/Homework 1/Helper.hpp b/CST 126/Homework 1/Helper.hpp
index fc86421..918e426 100644
--- a/CST 126/Homework 1/Helper.hpp
+++ b/CST 126/Homework 1/Helper.hpp
@@ -36,6 +36,7 @@ double InputDouble(const char* Prompt)
}
return Value;
}
+
float InputFloat(const char* Prompt)
{
std::cout << Prompt << std::endl;
diff --git a/CST 126/Homework 1/TempLogHelper.hpp b/CST 126/Homework 1/TempLogHelper.hpp
index 87b0f04..18a8d35 100644
--- a/CST 126/Homework 1/TempLogHelper.hpp
+++ b/CST 126/Homework 1/TempLogHelper.hpp
@@ -7,6 +7,17 @@ struct Temperature {
float Low;
};
+struct DaysOfWeek {
+ char First[7] = { "Monday" };
+ char Second[8] = { "Tuesday" };
+ char Third[10] = { "Wednesday" };
+ char Fourth[9] = { "Thursday" };
+ char Fifth[7] = { "Friday" };
+ char Sixth[9] = { "Saturday" };
+ char Seventh[7] = { "Sunday" };
+
+};
+
float FarenheitToCelsius(float Temp);
void GreatLow(Temperature* WeekLog);
void GreatHigh(Temperature* WeekLog);
diff --git a/CST 126/Homework 1/main.cpp b/CST 126/Homework 1/main.cpp
index 8946c16..013857f 100644
--- a/CST 126/Homework 1/main.cpp
+++ b/CST 126/Homework 1/main.cpp
@@ -2,15 +2,10 @@
// Class: CST 126
// Date: 4/10/24
// Assignment: Homework 1
-
-//clear the screen after each menu choice&& change text color??
-
#include "MenuHelper.hpp"
int main()
{
-
UserMenu();
-
return 0;
} \ No newline at end of file