This repository has been archived on 2026-04-25. You can view files and clone it, but cannot push or open issues or pull requests.
TestDesk/inc/tester/quiz.h

47 lines
681 B
C
Raw Normal View History

2024-05-08 12:59:08 -05:00
#ifndef H_QUIZ
#define H_QUIZ
// Includes
#include <base.h>
#include "question.h"
// Classes
class Score{
public:
// Variables
float percentage;
int incorrect;
int correct;
std::vector<Question*> qIncorrect;
std::vector<int> aIncorrect;
std::vector<int> iIncorrect;
// Constructor
Score();
};
class Quiz{
private:
// Variables
std::vector<Question*> questions;
std::vector<int> answers;
public:
// Variables
std::string name;
std::string description;
int qCurrent;
// Constructors
Quiz(const char* quizPath, int wantedQuestions);
// Functions
void qAnswer(int answer);
Question* qGet();
int qSize();
Score qScore();
};
#endif