Question
In simple C++, write the code. (4) // Author: // Creation Date: // Last Modification Date: // Purpose: Returns the number of questions and answer
In simple C++, write the code.
(4) // Author: // Creation Date: // Last Modification Date: // Purpose: Returns the number of questions and answer // key of the exam (both as reference parameters) // We assume the file settings contains only two data: // Number of questions (in line 1 of the file) // Answer key (line 2 of the file) void readSettings (ifstream& settings, string& key, int& numOfQuestions) { // To be completed} Write a main program that uses the functions described above to: - Read settings.txt file. The file contains the number of questions in the test and the answer key for the multiple choice questions. o 10 o ABCDABBBBB - Read student answers from a file test.txt. The file contains the student answers The input you read must be displayed. o Sponge Bob ABCDACCCCC o Patrick Star AAAAAAAAAA o Squidward Tentacles ABCDABBBAA o Plankton Plank ABCDABBBBB - Generate a file named grades.txt that contains the point grade to 1 decimal place and letter grade for each student- Ex: o Sponge Bob 50.0% E o Patrick 20.0% F o Squidward Tentacles 80.0% B o Plankton 100.0% A - The Generated output must also be displayed.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started