Download the input.txt file which is shown in illustration 1. This file contains three students each with three grades that are divided into columns separated by a space. Column 1 is the name of the worker, columns 2-4 are the grades.

Your program shall be composed of three files:


1. Define a student structure which can store the following information

a. studentâ€™s name

b. grades for assignment 1, 2, 3

2. Prototype all functions generated in gradebook.cpp


1. Create a initStudent function which accepts a name and 3 grades as inputs to the function. Using the data passed, declare and initialize a student structure. Return the created structure.

2. Create a letterGrade function which accepts a student structure as an input and calculates a letter grade based on a 10 point grading scale. Then return a character representing the letter grade of the student.

3. Create a printStudent function which accepts a student structure as an input and prints the content of the passed structure. Also using the letterGrade function print the letter grade for each student.


1. Create a static array of student structures of size 10.

2. Open the input.txt file

3. Read in and store the fileâ€™s contents

a. Store each line into temporary variables

b. Use the initStudent function to generate a structure

c. Place the created structure in the array

4. Print each studentâ€™s information to the console using the printStudent function

5. Close the file and exit the program

input file:

joe 85 65 84

bill 95 24 97

phil 52 42 49

Want an answer?

No answer yet. Submit this
question to the community.