PLease use this link for your reference:…
Question Answered step-by-step PLease use this link for your reference:… PLease use this link for your reference:https://github.com/Seneca-244200/OOP-Workshops/tree/main/WS01/DIY In this part you are to make “Quizzer”: a program that loads multiple-choice/multiple-answer type of questions from a file, creates a quiz and shows it to the user. The user will see the question text, a list of possible answers to each question and make a choice about which answer is correct. At the end of the quiz, the program will print a score (how many of the user’s answers were correct).The Input FileThe questions for the quiz will be loaded from a text file. The file has a very well defined structure and you can assume that it will always be correct (no error checking is required for reading from the file).Each question looks like this:{mc} When a C program starts, the function that gets executed is called ________[ ] principal[X] main[ ] function[ ] func[ ] programThe question text will have exactly one line. The first characters will be{mc} – to signal a multiple-choice question (a question with exactly one correct answer){ma} – to signal a multiple-answer question (a question where multiple answers are correct)followed by a blank space and the text that will be presented to the user.After the question text, the file will contain the possible answers:[ ] – marks an incorrect answer[X] – marks a correct answerTwo consecutive questions will be separated by exactly two blank lines.The file can have maximum 60 questions. Each question can have maximum 10 answers. The text of a question can have maximum 1024 characters, and the text of an answer can have maximum 128 characters. Use these numbers when you design your code.Quiz ModuleCreate a module that contains any structures/functions/global variables that are useful when clients interact with a quiz. Your code must have at least the following (but you can add more, as your design requires):///
/// The name of the file containing the quiz.///
///
///
void ShowNextQuestion();///
void ShowQuizResults();Implement every function listed above in the namespace quizzer.Question moduleCreate a module named question that contains functionality related to a single question (e.g., to check if a question is valid, to check if an answer for a question is correct or not).HintsThe hints below are just guides; you can create a design that accomplishes the task using different features.Create a custom type (struct) to hold information about a question (type of question, text of the question, possible answers, which answer is correct, etc.).Create a custom type (struct) to hold information about a quiz (questions that are part of the quiz, current score the user has accumulated, which questions were shown and which weren’t, if the user took the quiz, etc.).Use arrays when you need to store a collection of objects of the same type.See which tasks must be performed multiple times; put that code in a function and call the function when needed.Keep the functions simple; a function should do only one thing. If a function becomes too long, break it into multiple simpler functions (a good rule of thumb is “a function should be at most a screen big”, so a reader doesn’t have to scroll to see the entire function).Use the provided sample output for hints about how to present the information to the user.Make sure you read and understand the provided code before implementing your solution.Check the C course for a refresh in file and string manipulation. Consider the following functions:std::fopen – https://en.cppreference.com/w/cpp/io/c/fclosestd::fclose – https://en.cppreference.com/w/cpp/io/c/fopenstd::fgets – https://en.cppreference.com/w/cpp/io/c/fgetsstd::fgetc – https://en.cppreference.com/w/cpp/io/c/fgetcstd::fscanf – https://en.cppreference.com/w/cpp/io/c/fscanfstd::scanf – https://en.cppreference.com/w/cpp/io/c/scanfstd::printf – https://en.cppreference.com/w/cpp/io/c/printfstd::strcpy – https://en.cppreference.com/w/cpp/string/byte/strcpystd::strncpy – https://en.cppreference.com/w/cpp/string/byte/strncpystd::strcmp – https://en.cppreference.com/w/cpp/string/byte/strcmpstd::strncmp – https://en.cppreference.com/w/cpp/string/byte/strcmpTester ProgramThe main module and the input files are provided. Read the code and make sure you understand it before attempting to implement anything. Do not change the existing code. If the program is implemented correctly, the output should look like the one from the sample_output.txt file. Computer Science Engineering & Technology C++ Programming OOP 244 Share QuestionEmailCopy link Comments (0)


