public: AuthenticationDialog() { // create all components by pasing the current // mediator into their constructors to establish links } voidnotify(Component* sender, std::string event)override{ if (sender == loginOrRegisterChkBx && event == "check") if (loginOrRegisterChkBx->checked) title = "Log in"; else title = "Register"; if (sender == okBtn && event == "click") if (loginOrRegister->checked) { // try to find the user if (!found) // show error msg } else { // create user account and log that user in }