Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create a GPA calculator using Visual Basic 2012 or 2013 •Ask the user to input a

ID: 3582825 • Letter: C

Question

Create a GPA calculator using Visual Basic 2012 or 2013

•Ask the user to input a list of classes and the number of tests per class.

•Once the user has entered this initial information, allow the list to be saved when the user exits the program.

•When the program starts, any existing data should be loaded automatically.

•After the user has entered the list of classes and number of tests for each class, the user can then enter grades for each test.

•Create a button that allows the user to request a GPA calculation at any time. (GPA = average for each class averaged for the total number of classes in a semester.)

•Program should have basic menu options that allow the user to exit the program and perform tasks you deem necessary for the program to function correctly.

Please include the design files for this and not just the code please for best results.

Explanation / Answer

Public Class Form1

    'variable to store student grade

    Dim Grade1 As String

    'variable to store student credit hours

    Dim Hours1 As Double

    'variable to store quality point calc

    Dim TotalQualityPoints As Double

    'variable to store gpa output

    Dim GPA As Double

    Private Sub btnRecord_Click(sender As Object, e As EventArgs) Handles btnRecord.Click

        Grade1 = txtGrade1.Text

        Hours1 = txtHours1.Text

        If Grade1 = "A" Then

            Grade1 = 4

        End If

        If Grade1 = "B" Then

            Grade1 = 3

        End If

        If Grade1 = "C" Then

            Grade1 = 2

        End If

        If Grade1 = "D" Then

            Grade1 = 1

        End If

        If Grade1 = "F" Then

            Grade1 = 0

        End If

    End Sub

    Private Sub btnGPA_Click(sender As Object, e As EventArgs) Handles btnGPA.Click

        TotalQualityPoints = (Grade1 + Hours1)

        GPA = (Grade1) / TotalQualityPoints

        txtOutput.Text = (GPA)

    End Sub

End Class