Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Program must be written in C++: Write a program that reads test scores of students in a programming class from an input file, data.txt, and

Program must be written in C++:

Write a program that reads test scores of students in a programming class from an input file, data.txt, and calculates the minimum, maximum, average test score for each student as well as the overall average score for the class. Each row of the file contains student name (no spaces), and 3 scores for test 1, test 2, and test 3, respectively. Your main program should: open the file and check for successful open, then start reading one line at a time until EOF. For each line read, pass the grades for the three tests to a function called ProcessARow that calculates the minimum, maximum and average of the three grades. The results (minimum, maximum, and average) should be returned to the main program and the main program prints them on the screen in a table format. NOTE: minimum, maximum, average need to be sent by reference Call the function, ProcessOverall, that calculates the overall average of all grades. NOTE: parameters must be sent by value Sample input file: Bob 78 92 88 Sue 89 94 78 Fred 100 80 92 George 90 90 85 Mary 95 70 99 Jane 100 92 87 Sample output: Name Average Score ------------------------------ Bob 86.00 Sue 87.00 Fred 90.66 George 90.00 Mary 88.33 Jane 93.00 ------------------------------ Overall Average: 89.16

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

Database In Depth Relational Theory For Practitioners

Authors: C.J. Date

1st Edition

0596100124, 978-0596100124

More Books

Students also viewed these Databases questions

Question

What is barite most commonly used for?

Answered: 1 week ago

Question

Explain the legal environments impact on labor relations. page 631

Answered: 1 week ago

Question

Question What is a Roth 403 (b) plan?

Answered: 1 week ago