#pragma once
#include <string>
#include <fstream>

class Question
{
    private:
        int _id;
        std::string _text;
        std::string _correct_answer;
        int _score;
    public:
        Question(int id, std::string text, std::string correct_answer, int score);
        Question();
        ~Question()=default;
        int id();
        std::string text();
        std::string correct_answer();
        int score();
        void id(int id);
        void text(std::string text);
        void correct_answer(std::string correct_answer);
        void score(int score);
        friend void operator>>(std::string& is, Question& q);
        friend std::ofstream& operator<<(std::ofstream& os, Question& q);

};

void operator>>(std::string& is, Question& q);
std::ofstream& operator<<(std::ofstream& os, Question& q);