please write code exactly word for word as described in the question using C++. thank you in…

please write code exactly word for word as described in the
question using C++. thank you in advance!!!

For lab lesson 10 (both parts) you will be developing your
solutions using an Integrated Development Environment (IDE) such as
Visual Studio, Code::Blocks or Eclipse. You should use whatever IDE
you are using for your CS 1336 class. Once you have
created and tested your solutions you will be uploading the files
to zyBooks/zyLabs. Your uploaded file must match
the name specified in the directions for the lab lesson. You will
be using an IDE and uploading the appropriate files for this and
all future lab lessons.

The filename for your source file must
be lesson10part1.cpp.

You will need to develop and test the program in your IDE. Once
you are satisfied that it is correct you will need to upload the
source file to zyBooks/zyLabs, and submit it for
the Submit mode tests. If your program does not
pass all of the tests you need to go back to the IDE, and update
your program to fix the problems you have with the tests. You must
then upload the program from the IDE
to zyBooks/zylabs again. You can then run the
tests again in Submit mode.

When running your program in Submit mode it
is very important that you look at the output
from all of the tests. You should then try and
fix all of the problems in your IDE and then upload the updated
code to zyBooks/zyLabs.

C++ requirements

  • The program must make use of two parallel arrays. Each array is
    of type char or unsigned char. The
    size of each array is 30.
  • Your program must properly check for end of file.
  • Your program must properly open and close all files.
  • You are required to have your main function and two
    additional functions. One of the two additional functions will be a
    read function and the other will be a display function.

Failure to follow the C++ requirements could reduce the points
received from passing the tests.

General overview

In part 1 you will be creating a quiz grading program. You will
compare the student’s answers with the correct answers, and
determine if the student passed the quiz or not.

The program will make use of two parallel arrays.

Each array must be able to support up to 30 characters (so you
have two arrays of char or unsigned
char values, each one with 30 elements).

Your program will need to read in the student answer input file
name from cin. It will also need to read in the correct answer
file name from cin. You should use
the >> operator to read from cin and
not get or getline.
Using get or getline will be more difficult and
will require that you filter out white-space characters in your
program.

The contents of the student input file should be read into
one char array. The file will contain up to 30
characters, each character on a separate line of the file. The
first line in the input file will contain the students answer to
the first question, the second line will contain the student’s
answer to the 2nd question, and so on for up to 30 questions. The
answers are A, B, C or D (all upper case).

The answer file will be read in as well, one answer per line for
up to 30 answers. The first line of text is the answer for question
1, then second line is the answer for question 2, and so on.

You need to keep track of the number of student answers and the
correct answers. If the number of student answers and correct
answers is not the same you need to output an error message (see
below).

As always, close the input files when you are done with
them.

Your program needs to determine the number of questions that the
student missed and then display the following:

  • A list of questions missed by the student, showing the question
    number (1 through up to 30), the correct answer, and the incorrect
    answer.
  • The total number of questions missed by the student
  • The percentage of the questions answered correctly.
  • If the percentage of questions answered correctly is 70% or
    more indicate that the student passed, otherwise state that the
    student failed the quiz.

You need to have at least the following three functions,
including main.

Read function

One function needs to be passed
a char or unsigned char array of size 30, it
also needs to be passed an input file name. The return from the
function should be an int value.

If the number of input values is > 30 return 30. Otherwise
return the number of values read in. If the file does not exist
return -1.

Work/Display function

The work/display function will be passed the two arrays, the
number of student answers and correct answers read in, and should
calculate and display the results from the program.

The function needs to do the following:

  • A list of questions missed by the student, showing the question
    number (1 through up to 30), the correct answer, and the incorrect
    answer.
  • The total number of questions missed by the student
  • The percentage of the questions answered correctly.
  • If the percentage of questions answered correctly is 70% or
    more indicate that the student passed, otherwise state that the
    student failed the quiz.

The main function

The main will prompt for the student answers file name
and call the read function.

If the read function fails the program should output an error
message and quit.

If the first read works the main should prompt for an
read in the correct answers file name and call the read function a
second time.

If the read fails an error message should be displayed
and main should quit.

If the number of student answers is not the same as the number
of correct answers an error message should be displayed
and main should quit.

If the number of student answers and correct answers are the
same but are both 0 display an error message and quit.

If your program gets this far call the work/display
function.

As always you cannot use any global variables in your
program.

See the sample runs for examples of the prompts, error messages,
and results output.

See the sample runs for the output requirements.

Sample run 1 (valid data)

Contents of cin:

student.txt
answers.txt

Contents of student.txt:

A
B
C
D
A
B
C
D
A
B
C
D
A
B
C
D
A
B
C
D

Contents of answers.txt:

A
A
A
A
B
B
B
B
C
C
C
C
D
D
D
D
A
B
C
D

Here is the output to cout:

Enter student answers file name
Enter correct answer file name
Question 2 has incorrect answer 'B', the correct answer is 'A'
Question 3 has incorrect answer 'C', the correct answer is 'A'
Question 4 has incorrect answer 'D', the correct answer is 'A'
Question 5 has incorrect answer 'A', the correct answer is 'B'
Question 7 has incorrect answer 'C', the correct answer is 'B'
Question 8 has incorrect answer 'D', the correct answer is 'B'
Question 9 has incorrect answer 'A', the correct answer is 'C'
Question 10 has incorrect answer 'B', the correct answer is 'C'
Question 12 has incorrect answer 'D', the correct answer is 'C'
Question 13 has incorrect answer 'A', the correct answer is 'D'
Question 14 has incorrect answer 'B', the correct answer is 'D'
Question 15 has incorrect answer 'C', the correct answer is 'D'
12 questions were missed out of 20
The student grade is 40.0%.
The student failed

Sample run 2 (invalid student file)

Contents of cin:

invalidfile.txt
answers.txt

Here is the output to cout:

Enter student answers file name
File "invalidfile.txt" could not be opened

Sample run 3 (invalid answer file)

Contents of cin:

student.txt
invalidfile.txt

Here is the output to cout:

Enter student answers file name
Enter correct answer file name
File "invalidfile.txt" could not be opened

Sample run 4 (questions and answers are not the
same)

Contents of cin:

student.txt
answer2.txt

Here is the output to cout:

Enter student answers file name
Enter correct answer file name
The student answers file has 20 entries and the correct answers file has 21 entries
Grading cannot be done if they are not the same

Note that the error message is on two lines. You must output two
lines for the error messages.

Sample run 5 (the number of questions and answers is
0)

Contents of cin:

student.txt
answer2.txt

Here is the output to cout:

Enter student answers file name
Enter correct answer file name
The number of student answers and correct answers are both 0
No grade can be calculated

Note that the error message is on two lines. You must output two
lines for the error messages.

Sample run 6 (all answers valid)

Assume the student input file and the answers file both have 15
values and the answers file has all correct answers. The output
to cout would be:

Enter student answers file name
Enter correct answer file name
0 questions were missed out of 15
The student grade is 100.0%
The student passed

Failure to follow the requirements for lab lessons can result in
deductions to your points, even if you pass the validation tests.
Logic errors, where you are not actually implementing the correct
behavior, can result in reductions even if the test cases happen to
return valid answers. This will be true for this and all future lab
lessons.

Expected output

There are 14 tests. Each test will have a new set of input data.
You must match, exactly, the expected output.

You will get yellow highlighted text when you run the tests if
your output is not what is expected. This can be because you are
not getting the correct result. It could also be because your
formatting does not match what is required. The checking that
zyBooks does is very exacting and you must match it exactly. More
information about what the yellow highlighting means can be found
in course “How to use zyBooks” – especially section “1.4 zyLab
basics”.

Finally, do not include
a system(“pause”); statement in your program. This will
cause your verification steps to fail.

Note: that the system(“pause”); command
runs the pause command on the computer where the program
is running. The pause command is
a Windows command. Your program will be
run on a server in the cloud. The cloud server may be running a
different operating system (such
as Linux).

Error message “Could not find main function”

Now that we are using functions some of the tests are unit
tests. In the unit tests the zyBooks environment will call one or
more of your functions directly.

To do this it has to find your main function.

Right now zyBooks has a problem with this when your int main()
statement has a comment on it.

For example:

If your main looks as follows:

int main() // main function

You will get an error message:

Could not find main function

You need to change your code to:

// main function
int main()

If you do not make this change you will continue to fail the
unit tests.

Calculate the price
Make an order in advance and get the best price
Pages (550 words)
$0.00
*Price with a welcome 15% discount applied.
Pro tip: If you want to save more money and pay the lowest price, you need to set a more extended deadline.
We know how difficult it is to be a student these days. That's why our prices are one of the most affordable on the market, and there are no hidden fees.

Instead, we offer bonuses, discounts, and free services to make your experience outstanding.
How it works
Receive a 100% original paper that will pass Turnitin from a top essay writing service
step 1
Upload your instructions
Fill out the order form and provide paper details. You can even attach screenshots or add additional instructions later. If something is not clear or missing, the writer will contact you for clarification.
Pro service tips
How to get the most out of your experience with MyhomeworkGeeks
One writer throughout the entire course
If you like the writer, you can hire them again. Just copy & paste their ID on the order form ("Preferred Writer's ID" field). This way, your vocabulary will be uniform, and the writer will be aware of your needs.
The same paper from different writers
You can order essay or any other work from two different writers to choose the best one or give another version to a friend. This can be done through the add-on "Same paper from another writer."
Copy of sources used by the writer
Our college essay writers work with ScienceDirect and other databases. They can send you articles or materials used in PDF or through screenshots. Just tick the "Copy of sources" field on the order form.
Testimonials
See why 20k+ students have chosen us as their sole writing assistance provider
Check out the latest reviews and opinions submitted by real customers worldwide and make an informed decision.
11,595
Customer reviews in total
96%
Current satisfaction rate
3 pages
Average paper length
37%
Customers referred by a friend
OUR GIFT TO YOU
15% OFF your first order
Use a coupon FIRST15 and enjoy expert help with any task at the most affordable price.
Claim my 15% OFF Order in Chat
Live ChatWhatsApp

Are You Looking For Assignment Help? We Can Certainly Assist You