diff --git a/Questions.cpp b/Questions.cpp index 17a8c4677028ff34dec0bdc3f2937b247e5bb9a2..6651057ca963da1441788f574da89d78c37f244d 100644 --- a/Questions.cpp +++ b/Questions.cpp @@ -145,6 +145,7 @@ bool Questions::addSubQuestion(int level) { return false; } + bool Questions::wordQuestion(int level) { cout << "Question type not configured."; return false; diff --git a/Questions.h b/Questions.h index 792b447e38cbff256d1a7667d70866257c344735..ba7395a2f32d5abd44b7b07173eea3c68db173b1 100644 --- a/Questions.h +++ b/Questions.h @@ -23,6 +23,12 @@ class Questions { // Asks a question, returns true if the kid was right, false if they were wrong. bool wordQuestion(int level); + + // Accessor + int getMaxLevel() { return maxLevel; } + + private: + int maxLevel = 10; }; #endif //QUESTIONS_H \ No newline at end of file diff --git a/Student.cpp b/Student.cpp index 7bdb2b2bc168a3ed64da7551f953e46d8554d2a1..5f52f6d54eed1cae385888ad6ef9d4107239c47d 100644 --- a/Student.cpp +++ b/Student.cpp @@ -49,10 +49,7 @@ void Student::displayMenu(){ case 2: // Log Out cout << "Goodbye." << endl; studentMenuActive =0; - break; /* Can you have something here that will cause the program to exit the menu when they choose logout? - This can be done with a boolean return type for this function (returns true until they choose to logout, then it returns false) - Or with a separate function like Andrew did in Teacher (you can check his code for a template). - The idea is that as much of the process of each menu is contained within the menu function, (ecapsulation). */ + break; default: cout << "Invalid choice.\n"; break; @@ -80,16 +77,24 @@ void Student::practice(){ do{ cout << "Would you like to test out? (Y)es/(N)o "; cin >> choice; - if(choice == 'Y'){ //testing stage - testingStage(); - testing = true; - break; - }else if(choice == 'N'){ //reset values for count - count=0; - break; - }else{ - cout << "Invalid input." <