# C++ visual Studiogradebook Solution

In this assignment, you will implement a simplified gradebook. Your application should:

• Ask for a student's name.

• Ask for how many letter grades will be inputted.

• After all of the valid letter grades are entered, display the student's grade point average (GPA).

• Ask if there is another student to be entered. (If yes, then repeat this workflow. If no, end the program cleanly.)
Note that the student's grades are entered as letters, but the GPA calculation will require translating those grades to numerical values. Use the "standard" letter grade-to-number conversion:

• A = 4

• B = 3

• C = 2

• D = 1

• F = 0

When doing this conversion, you must use a switch block. For the "default" case, output an "invalid grade" message and repeat the input request.

Also, your program must use at least one user-defined function (main does not count). You must define the function and actually use it in your program. You can use the function to prompt for input, calculate the average, etc. It's your choice, but you must have at least one function.

EXAMPLE OUTPUT

What is the student's name? Sam
How many grades does Sam have? 5

Enter grade 1: A
Enter grade 2: A
Enter grade 3: E
Error: invalid grade entered. Try again.
Enter grade 3: B
Enter grade 4: D
Enter grade 5: A

Sam's GPA: 3.2

Do you want to enter data for another student (Y/N)? N

Thank you. Bye!

APPROACH DOCUMENT
Along with your program, you should also submit an Approach Document for this assignment. This is a short document (two to five pages long) explaining the project’s design and testing. The font size should be 12 point. The page margins should be one inch. The paragraphs can be single- or double-spaced. All figures, tables, equations, and references should be properly labeled, and do not count towards the page count.
This document should address the following points:

How did you approach this assignment?

How did you design your solution?
What difficulties, if any, did you encounter implementing your solution?
How did you test your solution? (Include test data)

What weaknesses, if any, can you identify in the program? How can these weaknesses be addressed?
How can this program be improved?