Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a c++ that: o reads in a list of student numbers and MCQ answers from a file called input.txt (as seen in Listing 3),
Write a c++ that:
o reads in a list of student numbers and MCQ answers from a file called input.txt (as seen in Listing 3), . passes each student's MCQ answers and the correct answers to a function called calculateMCQScore which returns a score and writes each student number and a mark to an output file called output.txt (as seen in Listing 4) The input file will have the following format o the first line will have 000000 in place of the student number and will be followed by a string representing the correct MCe answers each line thereafter will have a non-zero student number followed by the students selection for the MCQ questions The following assumptions can be made * there will be a maximum of 10 lines in input.txt * there will be 10 MCQ letters following each student number. An example of the input and output file can be seen below Listing 3: input.txt 1 000000 abcdabedcb 2 112233 abbacdebad 3 345654 bacdddebbb 4 231890 babedababc 5 457890 bbbbbbbcda 6 097321 abcdabedcd Listing 4: output.txt 1112233 3 2 345654 4 3231890 0 4457890 2 5097321 9
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