Commit 35885381 authored by Eddy Marinez's avatar Eddy Marinez

thing

parent f961d4fb
...@@ -48,6 +48,7 @@ void Student::displayMenu(){ ...@@ -48,6 +48,7 @@ void Student::displayMenu(){
break; break;
case 2: // Log Out case 2: // Log Out
cout << "Goodbye." << endl; cout << "Goodbye." << endl;
studentMenuActive =0;
break; /* Can you have something here that will cause the program to exit the menu when they choose logout? 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) 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). Or with a separate function like Andrew did in Teacher (you can check his code for a template).
...@@ -140,3 +141,6 @@ void Student::setLevel(int levelIn) { ...@@ -140,3 +141,6 @@ void Student::setLevel(int levelIn) {
void Student::setUserName(string userNameIn) { void Student::setUserName(string userNameIn) {
userName = userNameIn; userName = userNameIn;
} }
const bool Student::getMenuActive() {
return studentMenuActive;
}
\ No newline at end of file
...@@ -46,6 +46,7 @@ class Student { ...@@ -46,6 +46,7 @@ class Student {
void setUserName(string userNameIn); void setUserName(string userNameIn);
private: private:
bool studentMenuActive = 1;
string userName; string userName;
int level = 1; int level = 1;
Questions questionAsk; Questions questionAsk;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment