please see attached files C++

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

please see attached files

C++

**Student Answers vs. Correct Answers**

This document contains a comparison between student responses and the correct answers for a given test. 

**Student Answers File (studenAnswers.txt):**

1. **Smith**: A B C D B C D B B B C D A A A B D D A D
2. **Jones**: A C C D C C D A B B C D A A A B C C A D
3. **Plumlee**: A B C D B C D A B B C D A A A B C D A C
4. **Bigelow**: C B C D B C D A B B C D A A A B C D A D
5. **North**: A B C D B C D A B B C D A A A B C D A D
6. **Rix**: A B D D B C D A B B D A A D B C D D D
7. **Gaddis**: A A C D B C A A B B C A A B B C C A D
8. **IckySlobongo**: A A A A A A A A A A A A A A A A A A A A

**Correct Answers File (correctAnswers.txt):**

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

**Explanation:**

The student answers are formatted with each student's name followed by their selected answers, separated by spaces. The correct answers are also listed in a similar format. 

This text is intended for educational purposes, allowing students and educators to evaluate the accuracy of the responses compared to the correct answer key.
Transcribed Image Text:**Student Answers vs. Correct Answers** This document contains a comparison between student responses and the correct answers for a given test. **Student Answers File (studenAnswers.txt):** 1. **Smith**: A B C D B C D B B B C D A A A B D D A D 2. **Jones**: A C C D C C D A B B C D A A A B C C A D 3. **Plumlee**: A B C D B C D A B B C D A A A B C D A C 4. **Bigelow**: C B C D B C D A B B C D A A A B C D A D 5. **North**: A B C D B C D A B B C D A A A B C D A D 6. **Rix**: A B D D B C D A B B D A A D B C D D D 7. **Gaddis**: A A C D B C A A B B C A A B B C C A D 8. **IckySlobongo**: A A A A A A A A A A A A A A A A A A A A **Correct Answers File (correctAnswers.txt):** - A B C D B C D A B B C D A A A B C D A D **Explanation:** The student answers are formatted with each student's name followed by their selected answers, separated by spaces. The correct answers are also listed in a similar format. This text is intended for educational purposes, allowing students and educators to evaluate the accuracy of the responses compared to the correct answer key.
**Write a Program to Accomplish the Following:**

One of your professors has asked you to write a program to grade her final exams, which consist of 20 multiple choice questions. Each question has one of four possible answers: A, B, C, or D.

The file “correctAnswers.txt” contains the correct answers for all 20 questions. All 20 answers are written on one line in the file.

Write a program that reads the contents of CorrectAnswers.txt into a `char` array, then reads the contents of another file containing the students’ names and answers.

This second file is named “studentAnswers.txt” and has the following format:
- StudentAnswers.txt contains data for an entire class of students.
- There is one student's information on each line in the file. Each line contains the student's last name followed by student answers to the test questions (always 20 answers). The student’s last name will not have any spaces. You may assume it is a single “word”.
- A sample is given below:
  ```
  Smith A B C D B C D B B B C D A A A B D D A D
  Jones A C C D C C D A B B C D A A B C C A D
  ```
  
A sample of each file is provided on Blackboard for studentAnswers.txt and correctAnswers.txt.

For each student in the studentAnswers.txt file the program should determine the number of questions that the student missed, then display the following:
- A row of “equal signs” as a separator to clearly show the beginning of each student’s separate report.
- The student name
- A line which reads “Missed Questions”
- A line which reads “Question Given Correct”
- A row of dashes separating the previous two lines from the data list.
- Below the row of dashes for each student, display a list of question numbers that were missed, the answer given, and the correct answer.
- Below the list of missed questions, display if the student passed or failed, and then the percentage of correct answers in parentheses. 70% is a passing grade.

Your program should handle any number of students, up to a maximum of 50 students (that is, it should work even if the input file had, say, 10 or 30 students). If the file has more than 50 students, your program should only read the first 50.

**In other words, your file
Transcribed Image Text:**Write a Program to Accomplish the Following:** One of your professors has asked you to write a program to grade her final exams, which consist of 20 multiple choice questions. Each question has one of four possible answers: A, B, C, or D. The file “correctAnswers.txt” contains the correct answers for all 20 questions. All 20 answers are written on one line in the file. Write a program that reads the contents of CorrectAnswers.txt into a `char` array, then reads the contents of another file containing the students’ names and answers. This second file is named “studentAnswers.txt” and has the following format: - StudentAnswers.txt contains data for an entire class of students. - There is one student's information on each line in the file. Each line contains the student's last name followed by student answers to the test questions (always 20 answers). The student’s last name will not have any spaces. You may assume it is a single “word”. - A sample is given below: ``` Smith A B C D B C D B B B C D A A A B D D A D Jones A C C D C C D A B B C D A A B C C A D ``` A sample of each file is provided on Blackboard for studentAnswers.txt and correctAnswers.txt. For each student in the studentAnswers.txt file the program should determine the number of questions that the student missed, then display the following: - A row of “equal signs” as a separator to clearly show the beginning of each student’s separate report. - The student name - A line which reads “Missed Questions” - A line which reads “Question Given Correct” - A row of dashes separating the previous two lines from the data list. - Below the row of dashes for each student, display a list of question numbers that were missed, the answer given, and the correct answer. - Below the list of missed questions, display if the student passed or failed, and then the percentage of correct answers in parentheses. 70% is a passing grade. Your program should handle any number of students, up to a maximum of 50 students (that is, it should work even if the input file had, say, 10 or 30 students). If the file has more than 50 students, your program should only read the first 50. **In other words, your file
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY