56 57 bool LoginMenu::authenticate() { bool valid = false; for (int i = 0; i < (int) list.size(); i++) { if (login.getUsername () == list.at (i).getUsername () && login.getPassword () == list.at (i).getPassword()) { int mo= 0, d = 0, yr = 0, hr = 0, min = 0, sec = 0; getCurrentTime (mo, d, yr, hr, min, sec); 58 59 60 61 62 63 64 65 66 67 68 69 } 70 71 bool LoginMenu::doLogin() { 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 } 97 98 } 99 // TODO set loginDateTime valid = true; break; 106 107 108 109 110 } return valid; int attempt = 0; do { string username, password; cout << "Username: "; cin >> username; cout << "Password: "; cin >> password; login.setUsername (username); login.setPassword (password); // TODO Lab 3 set login DateTime cout << endl; if (authenticate()) { return true; 88} 89 90 91 92 93 } 94 95 bool LoginMenu::remove() { 96 } } while (++attempt < 3); return false; bool LoginMenu::create() { cout << "Todo create" << endl; return true; cout << "Todo Remove" << endl; return true; 100 bool LoginMenu::reset() { 101 cout << "Todo Reset" << endl; return true; 102 103 } 104 105 bool LoginMenu::doLogout() { cout << "Todo Logout" << endl; int mo = 0, d = 0, yr = 0, hr = 0, min = 0, sec = 0; getCurrent Time (mo, d, yr, hr, min, sec); // TODO set logoutDateTime return true;
56 57 bool LoginMenu::authenticate() { bool valid = false; for (int i = 0; i < (int) list.size(); i++) { if (login.getUsername () == list.at (i).getUsername () && login.getPassword () == list.at (i).getPassword()) { int mo= 0, d = 0, yr = 0, hr = 0, min = 0, sec = 0; getCurrentTime (mo, d, yr, hr, min, sec); 58 59 60 61 62 63 64 65 66 67 68 69 } 70 71 bool LoginMenu::doLogin() { 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 } 97 98 } 99 // TODO set loginDateTime valid = true; break; 106 107 108 109 110 } return valid; int attempt = 0; do { string username, password; cout << "Username: "; cin >> username; cout << "Password: "; cin >> password; login.setUsername (username); login.setPassword (password); // TODO Lab 3 set login DateTime cout << endl; if (authenticate()) { return true; 88} 89 90 91 92 93 } 94 95 bool LoginMenu::remove() { 96 } } while (++attempt < 3); return false; bool LoginMenu::create() { cout << "Todo create" << endl; return true; cout << "Todo Remove" << endl; return true; 100 bool LoginMenu::reset() { 101 cout << "Todo Reset" << endl; return true; 102 103 } 104 105 bool LoginMenu::doLogout() { cout << "Todo Logout" << endl; int mo = 0, d = 0, yr = 0, hr = 0, min = 0, sec = 0; getCurrent Time (mo, d, yr, hr, min, sec); // TODO set logoutDateTime return true;
Chapter10: Introduction To Inheritance
Section: Chapter Questions
Problem 14RQ
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT