Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Intelligent Databases Technologies And Applications

Authors: Zongmin Ma

1st Edition

1599041219, 978-1599041216

More Books

Students also viewed these Databases questions

Question

To whom do the conclusions apply?

Answered: 1 week ago

Question

Solve for x: 2(3x 1)2(x + 5) = 12

Answered: 1 week ago

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago