Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Your program must be setup to open ExamGrades.txt as the file. For testing you can add your own ExamGrades.txt file into visual studios as a

image text in transcribed
image text in transcribed
Your program must be setup to open "ExamGrades.txt" as the file. For testing you can add your own ExamGrades.txt file into visual studios as a resource (right click resource in solution explorer -> go to add new -> utility -> text file). The file you will be imputing to your program is a record of the 3 exam grade from a class of students. You will need to read in the information for the student number first. This data will be used later to calculate some of the output. "Students:" in the file is only a decoration/label but you will still need to read it in (or use the stream ignore function) so that you can get to the student number. The maximum amount of students these classes will ever have is 8. To read in the first line your code file could look something like this: Ifstream file; file.open("ExamGrades.txt"); int students; string studentLabel; file >> studentLabel; file >> students; A simple cout then can confirm that you read in the data correctly. The next item in the file is the quizzes and homework average for the course. This data too will be used later. Next we have the first exam 1. We need to read in the total number of attempts on this exam. This number will tell us how many grades will follow on the line below and thus how many numbers we will need to read in to compute the Exam average. Example input: Students Quit/Homework Average: 66.85 EX Attempts: 7 31 90 55 67 101 77 91 Exam 2 Attempts 24 66 61 98 71 Exam 3 Attempts: 6 54 87 100 79 67 93 Your output will be the average for each exam as well as whether the student did better or worse than the quizzes and homework average. Additionally, output the number of attempts above and below the quizzes and homework average per exam. For the example file above the output should be: Exam 1 Attempts: 7 Average: 80.2857 Exam 1 average above quiz/homework average Number above quiz average 6 Number below quiz average: 1 Exam 2: Attempts: 5 Average: 64 Exam 2 average below quiz/homework average Number above quiz average: 2 Number below quiz average 3 Exam 3 Attempts: 6 Average: 80 Exam 3 average above quiz/homework average Number above quiz average: 5 Number below quiz average 1 Remember that the data file given here is merely and example and not the file I will test your program with The test file will be similar ihsve 3 exams and formatted exactly the same, but it will have different numbers. Your final submiss on should be your coofie only (os again will use my own txt file to grade your assignment

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

Databases Organizing Information Digital And Information Literacy

Authors: Greg Roza

1st Edition

1448805929, 978-1448805921

More Books

Students also viewed these Databases questions