#include "Exam.h"
#include <QtWidgets/QApplication>
#include "Service.h"
#include "Collector_view.h"
#include "Admin_view.h"

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    Repository repo{};
    Service service{repo};
    for(auto user: repo.users()){
        if(user.type() == "collector"){
            Collector_view* view = new Collector_view{service, user};
            view->show();
        }
        else{
        Admin_view* view = new Admin_view{service, user};
        view->show();
        }
    }
    return a.exec();
}
