Question: I need help on my assignment 1. (20 points) Develop a C++ program named hw2.cpp that reads a data file holding the records of students
I need help on my assignment
1. (20 points) Develop a C++ program named hw2.cpp that reads a data file holding the records of students id and scores of two exams. Your program should determine the numeric average and letter grade of each student (there will be 30 students, at most). Then, your program should print out the students arranged from highest numeric average, to lowest. The output should go back to the console, not a file.
You should create a struct to hold the students id, numeric average, and letter grade. Furthermore, you are to use an array to hold this data. Note, you will not have an array within your struct declaration.
The following shows a sample input data file. Please note that the file has the number of students as the first line.
Sample Input File
5 1000 87.0 92.5 2000 100.0 100.0 3000 79.0 81.0 4000 99.0 98.5 5000 65.0 61.9
A sample run of your program might look like this. Note that the users input are highlighted in bold.
Sample Execution
Enter an input file: C:/CSS2A/input.txt ---------------------------------------------- Course Report ---------------------------------------------- 2000 - 100.00 (A) 4000 - 98.75 (A) 1000 - 89.75 (B) 3000 - 80.00 (B) 5000 - 63.45 (D) ----------------------------------------------
Step by Step Solution
There are 3 Steps involved in it
To develop the C program as described in your assignment we will follow a stepbystep approach to ensure each requirement is handled properly Lets outl... View full answer
Get step-by-step solutions from verified subject matter experts
