Input file and Output file

Good Evening all, I had a few questions regarding this input file:
1
2
3
4
5
6
7
8
9
10
11
12
13
6
Bunny, Bugs
Math 90 86 80 95 100 99 96 93
Schmuckatelli, Joe
English 88 75 90
Dipwart, Marvin
History 95 76 72 88
Crack Corn, Jimmy
Math 44 58 23 76 50 59 77 68
Kirk, James T.
History 40 100 68 88
Lewinsky, Monica
English 60 72 78



I already read in all the data given in this list but the problem for me is printing it.
I am required to have a user enter in the inpt file which is above, as well as the output file which is this:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Student Grade Summary 

ENGLISH CLASS 

Student                                   Final   Final   Letter 
Name                                      Exam    Avg     Grade 
---------------------------------------------------------------- 
Joe Schmuckatelli                         90      84.25   B 
Monica Lewinsky                           78      71.40   C 
  

HISTORY CLASS 

Student                                   Final   Final   Letter 
Name                                      Exam    Avg     Grade 
---------------------------------------------------------------- 
Marvin Dipwart                            88      80.30   B 
James T. Kirk                             88      80.80   B 
  

MATH CLASS 

Student                                   Final   Final   Letter 
Name                                      Exam    Avg     Grade 
---------------------------------------------------------------- 
Bugs Bunny                                93      94.83   A 
Jimmy Crack Corn                          68      65.33   D 


OVERALL GRADE DISTRIBUTION

A:   1
B:   3
C:   1
D:   1
F:   0


but the thing is Im not sure how to read all the data back into this output format. If there is anyone that could help that would be fantastic!
Last edited on
THis is for a student class inhereted by multiple class types...English, History and Math. So I have a sample of what I put here:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
cout << "Student Grade Summary" << endl;
    cout << "\nMATH CLASS" << endl;
    cout << fixed;
    cout << "Student" << right << setw(40) << "\tFinal" << right  << "\tFinal" << "\tLetter" << endl;
    cout << "Name " << right << setw(40) << "\tExam" << right << "\tAvg" << "\tGrade" << endl;
    cout << "-------------------------------------------------------------" << endl;

    for (int i = 0; i < size; i++)
    {
        if (c == "Math")
        {
            cout << list[i]->GetFname(fn) << " " << list[i]->GetLname(ln) << right << setw(40) << list[i]->returnFinal() << "\t" << list[i]->grade_Avg() <<
            cfinal << endl;
        }
    }
Topic archived. No new replies allowed.