For this assignment, you will write a program that will read in the data from a text file (provided) and store it in two arrays. The first two lines (student’s first name and last name) will be stored in a string array (that contains 2 columns). The last 5 lines (homework average, quiz average, exam average) will be stored in a double array (that contains 3 columns). The class can have up to 30 students enrolled (so you will have to allow for up to 30 students but track how many are read in). The program will average each student’s grade using the formula average = hw * 0.1 + quiz * 0.1 + exam * 0.8. Then it will determine the letter grade for the student. The output for each student will be FirstName LastName: Letter Grade. You need to do exception handing for the end of file and making sure the file exist. The file is formatted so that it has 5 lines per student. The files name is “Students.txt”. Do not change the name. • First Name • Last Name • Homework Average • Quiz Average • Exam Average in c++
Comments
Leave a comment