Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

to be done in c++ using given template: #include #include #include #include #include #include using namespace std; #define NUM_CHOICES 4 struct Responses { string text[4];

to be done in c++ using given template:

#include  #include  #include  #include  #include  #include  using namespace std; #define NUM_CHOICES 4 struct Responses { string text[4]; string answer; bool shuffle; }; struct Question { string ID; string text; Responses responses; int points; }; struct Summary { string questionID; bool correct; bool skipped; string answer; string givenAnswer; int points; }; // This function reads all the questions from questions.txt into // the Question Bank. It returns the amount of questions in the // Question Bank. int readQuestions (Question questionBank[]) { return 0; } // This function displays the contents of a question. It can // be used for debugging purposes to ensure that the data is // being read correctly from the file. void displayQuestion (Question question) { } // This function returns true if the exm already contains // the question with the given questionID and false, otherwise. bool containsQuestion (Question exm[], int numExmQuestions, string questionID) { return false; } // This function returns true if the set of responses already // contains the given response, and false otherwise. bool containsResponse (Responses responses, int numResponses, string response) { return false; } // This function accepts the question passed as a parameter, // shuffles the responses if the responses should be shuffled, // and returns the modified question. Question shuffleResponses (Question question) { return question; } // This function creates the exm containing numExmQuestions, // where the questions are taken randomly from the Question Bank, // which contains numQuestions.Duplicate questions are not // allowed in the exm. void prepareExm (Question questionBank[], int numQuestions, Question exm[], int numExamQuestions) { } // This function displays a question for the user to answer // while the exm is in progress. void displayExmQuestion (Question question) { } // After the exm is prepared, this function presents the // questions on the exm to the user, one by one. It also // records how the user responded to each question, for // the summary at the end. void generateExm (Question exm[], int numExmQuestions, Summary summary[]) { } // This function displays a summary of the user's performance on // each question of the exm, after the exm is completed. void displaySummary (Summary summary[], int numExmQuestions) { } // The main function calls readQuestions, prepareExm, // generateExm, and displaySummary to achieve the functionality // of Assignment 1. int main () { // Declarations for questionBank, exm, and summary Question questionBank[100]; int numQuestions; Question exm [50]; int numExamQuestions; Summary summary [50]; return 0; }

image text in transcribed

image text in transcribed

image text in transcribed

#include #include #include cemath> #include #include cestdlib> #include using namespace std; #define NUM_CHOICES struct Responses string text [4): string answer bool shuffle; }; struct Question { string ID; string text; Responses responses int points; ); struct Summary string questionID; bool correct; bool skipped; string answer: string givenAnswer: int points }; // This function reads all the questions from questions.txt into // the Question Bank. It returns the amount of questions in the // Question Bank. int readQuestions Question questionBank(1) > return 0; // This function displays the contents of a question. It can W be used for debugging purposes to ensure that the data is // being read correctly from the file. void displayQuestion (Question question) { > 1/ This function returns true if the exam already contains // the question with the given question ID and false, othervise. bool containsQuestion (Question examt 1. int numExamQuestions, string questionID) { return false; > // This function returns true if the set of responses already // contains the given response, and false otherwise. bool contains Response (Responses responses, int numResponses, string response) { return false; > // This function returns true if the set of responses already // contains the given response, and false otherwise. bool containsresponse (Responses responses, int numResponses, string response) { return false; > // This function accepts the question passed as a parameter, // shuffles the responses if the responses should be shuffled, // and returns the modified question. Question shuffleResponses (Question question) { return question: > // This function ereates the exam containing numExamQuestions, // where the questions are taken randonly from the Question Bank. // which contains nunQuestions. Duplicate questions are not // allowed in the exam. void prepareExam (Question questionBank'), int numQuestions, Question examt, int numExam > gestions) // This function displays a question for the user to answer // while the exam is in progress. void displayExamQuestion (Question question) > // After the exam is prepared, this function presents the 1/ questions on the exam to the user, one by one. It also W records how the user responded to each question, for // the summary at the end. vold generateExam (Question exam[], int numExamquestions, Sumary summary > // This function displays a summary of the user's performance on // each question of the exam, after the exam is completed. void displaySummary (Summary summary[], int numExamQuestions) { > // The main function calls readQuestions, prepareExam, W generateExam, and displaySummary to achieve the functionality 11 of Assignment 1. int main() // Declarations for questionBank, exan, and summary Question questionBank[100); int numQuestions ; Question exam (50) int numExamQuestions; Summary summary [50; return 0; > #include #include #include cemath> #include #include cestdlib> #include using namespace std; #define NUM_CHOICES struct Responses string text [4): string answer bool shuffle; }; struct Question { string ID; string text; Responses responses int points; ); struct Summary string questionID; bool correct; bool skipped; string answer: string givenAnswer: int points }; // This function reads all the questions from questions.txt into // the Question Bank. It returns the amount of questions in the // Question Bank. int readQuestions Question questionBank(1) > return 0; // This function displays the contents of a question. It can W be used for debugging purposes to ensure that the data is // being read correctly from the file. void displayQuestion (Question question) { > 1/ This function returns true if the exam already contains // the question with the given question ID and false, othervise. bool containsQuestion (Question examt 1. int numExamQuestions, string questionID) { return false; > // This function returns true if the set of responses already // contains the given response, and false otherwise. bool contains Response (Responses responses, int numResponses, string response) { return false; > // This function returns true if the set of responses already // contains the given response, and false otherwise. bool containsresponse (Responses responses, int numResponses, string response) { return false; > // This function accepts the question passed as a parameter, // shuffles the responses if the responses should be shuffled, // and returns the modified question. Question shuffleResponses (Question question) { return question: > // This function ereates the exam containing numExamQuestions, // where the questions are taken randonly from the Question Bank. // which contains nunQuestions. Duplicate questions are not // allowed in the exam. void prepareExam (Question questionBank'), int numQuestions, Question examt, int numExam > gestions) // This function displays a question for the user to answer // while the exam is in progress. void displayExamQuestion (Question question) > // After the exam is prepared, this function presents the 1/ questions on the exam to the user, one by one. It also W records how the user responded to each question, for // the summary at the end. vold generateExam (Question exam[], int numExamquestions, Sumary summary > // This function displays a summary of the user's performance on // each question of the exam, after the exam is completed. void displaySummary (Summary summary[], int numExamQuestions) { > // The main function calls readQuestions, prepareExam, W generateExam, and displaySummary to achieve the functionality 11 of Assignment 1. int main() // Declarations for questionBank, exan, and summary Question questionBank[100); int numQuestions ; Question exam (50) int numExamQuestions; Summary summary [50; return 0; >

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application And Administration

Authors: Michael Mannino, Michael V. Mannino

2nd Edition

0072880678, 9780072880670

More Books

Students also viewed these Databases questions

Question

What is meant by decentralisation of authority ?

Answered: 1 week ago

Question

Briefly explain the qualities of an able supervisor

Answered: 1 week ago

Question

Define policy making?

Answered: 1 week ago

Question

Define co-ordination?

Answered: 1 week ago

Question

What are the role of supervisors ?

Answered: 1 week ago

Question

What is DDL?

Answered: 1 week ago