Question: Write a program to handle student data in an input file. Each line in the file represents information for one student. Each line consists of
Write a program to handle student data in an input file. Each line in the file represents information for one student. Each line consists of data separated by spaces in this order: student last name, student first name, 6 exam grades. Write your program to handle a file for any number of students. If there is a student last name on a line, you can assume that there will be a complete line of data as described. Use last name as the variable to control your loop for reading until eof. Copy the file coursegrades.txt from the COSC1436 folder on the network share drive. You will use this file to test your program and prepare your report. Write a program to produce a well formatted report to an output file. Your report will include: Title line, including programmers name and date of report One line for each student giving first name, last name, 6 exams, and student average (in that order!) Use the correct output manipulators to line up the columns. Strings should be left aligned; numbers should be right aligned. After all student info has been printed, give how many students are in the class, and the class average of all final averages.
All averages should be printed with one place after the decimal. You will need to include and name two string variables for last name and first name. Input these strings Deal with the 6 exams per student with a loop. Do not put each exam into a separate variable.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
