Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This week I need your help! I need a program that will read student data from a file, compute average test scores and grades for

This week I need your help! I need a program that will read student data from a file, compute average test scores and grades for the course, and output the data in a file. The data that will be stored in the output file are the student names, average test scores and grades only for the students that have a grade of C or better. Requirements: ? Use the input data file studentData.txt located on Blackboard. Each line contains the first name, last name, and 5 test scores. Each data is separated by whitespace. For example, in the first line Anastasia is the first name, Angelopoulou is the last name, and 50 80 100 95 67 are the five test scores. You may use an array of structs to store the data. ? Output the data in a file named outputData.txt. Each line should contain the first name, last name, the average test score and grade only for the students with grade C or better. You are free to output and format the data as you prefer. For example, a line in the output file may look like this: Student Name Average Score Grade Anastasia Angelopoulou 78.4 C or simply Anastasia Angelopoulou 78.4 C where Anastasia is the first name, Angelopoulou is the last name, 78.4 is the average test score, and C is the grade. ? Grades are assigned as following: Average Test Score Grade >=90 >=80 >=70 >=60 <60 A B C D F Wichita State University CS 211 Spring 2018 ? You don't have to check if user input is invalid. The program will be tested for valid inputs. ? Your program must have at least these three functions (You are free to implement more functions, if necessary): o Function to read the students' data from the file o Function to assign the relevant grade to each student o Function to output the names, average scores and grades of the students with a grade of C or better to a file. ? Name the source file for your program program8.cpp ? Compile your program using g++ -Wall -o prog8 program8.cpp o You can run your program (an executable file named prog8 has been created) using ./prog8

Data:

Anastasia Angelopoulou 50 80 100 95 67 Duckey Donald 85 80 90 0 100 Goof Goofy 89 40 56 76 0 Brave Balto 93 95 96 100 100 Snow Smitn 93 95 0 0 0 Alice Wonderful 89 43 85 34 23 Samina Akthar 45 43 23 34 50 Simba Green 95 90 85 85 85 Donald Egger 90 78 87 90 90 Brown Deer 66 68 78 68 65 Johny Jackson 67 78 65 62 80 Greg Gupta 75 76 74 76 78 Samuel Happy 80 82 84 85 90 Danny Arora 80 80 82 86 60 Sleepy June 60 60 65 55 50 Amy Cheng 90 83 87 76 90 Shelly Malik 95 94 96 90 80 Chelsea Tomek 95 90 88 87 86 Angela Clodfelter 95 67 68 56 55 Allison Nields 95 78 67 65 54 Lance Norman 88 89 88 86 84 Andrew Miller 75 70 74 69 70

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

Oracle Databases On The Web Learn To Create Web Pages That Interface With Database Engines

Authors: Robert Papaj, Donald Burleson

11th Edition

1576100995, 978-1576100998

More Books

Students also viewed these Databases questions