// Include custom header files
#include "Quiz.h"
#include "printResult.h"

std::string printResult(const int &questions, const int &correct, const int &wrong) { // Function to assemble and print results by accessing Quiz members

    // Declare stringstream to hold assembled strings
    std::stringstream result;
    
    result << "Number of questions: " << questions << std::endl; // Assemble number of questions + value
    result << "Number correct answers: " << correct << std::endl; // Assemble number of correct answers + value
    result << "Number wrong answers: " << wrong << std::endl; // Assemble number of wrong answers + value
    result << "Final score: " << Quiz::getScore() << std::endl; // Assemble final score + value

    return result.str(); // Return string formatted stringstream

}