Design
Design
DESIGN
Dim unit1, unit2, unit3, unit4, unit5, unit6, unit7, unit8, totalunits As Integer '
Dim score1, score2, score3, score4, score5, score6, score7, score8 As Double
course1 = Val(TextBox1.Text)
course2 = Val(TextBox3.Text)
course3 = Val(TextBox5.Text)
course4 = Val(TextBox7.Text)
course5 = Val(TextBox9.Text)
course6 = Val(TextBox11.Text)
course7 = Val(TextBox13.Text)
course8 = Val(TextBox15.Text)
unit1 = Val(TextBox2.Text)
unit2 = Val(TextBox4.Text)
unit3 = Val(TextBox6.Text)
unit4 = Val(TextBox8.Text)
unit5 = Val(TextBox10.Text)
unit6 = Val(TextBox12.Text)
unit7 = Val(TextBox14.Text)
unit8 = Val(TextBox16.Text)
End If
End If
End If
If course6 > 100 Then
TextBox22.Text = "iNVALID"
ElseIf course6 >= 70 Then
TextBox22.Text = "A"
score6 = 5 * unit6
ElseIf course6 >= 60 Then
TextBox22.Text = "B"
score6 = 4 * unit6
ElseIf course6 >= 50 Then
TextBox22.Text = "C"
score6 = 3 * unit6
ElseIf course6 >= 45 Then
TextBox22.Text = "D"
score6 = 2 * unit6
ElseIf course6 >= 40 Then
TextBox22.Text = "E"
score6 = 1 * unit6
Else
TextBox22.Text = "F"
score6 = 0 * unit6
End If
If course7 > 100 Then
TextBox23.Text = "iNVALID"
ElseIf course7 >= 70 Then
TextBox23.Text = "A"
score7 = 5 * unit7
ElseIf course7 >= 60 Then
TextBox23.Text = "B"
score7 = 4 * unit7
ElseIf course7 >= 50 Then
TextBox23.Text = "C"
score7 = 3 * unit7
ElseIf course7 >= 45 Then
TextBox23.Text = "D"
score7 = 2 * unit7
ElseIf course7 >= 40 Then
TextBox23.Text = "E"
score7 = 1 * unit7
Else
TextBox23.Text = "F"
score7 = 0 * unit7
End If
If course8 > 100 Then
TextBox24.Text = "iNVALID"
ElseIf course8 >= 70 Then
TextBox24.Text = "A"
score8 = 5 * unit8
ElseIf course8 >= 60 Then
TextBox24.Text = "B"
score8 = 4 * unit8
ElseIf course8 >= 50 Then
TextBox24.Text = "C"
score8 = 3 * unit8
ElseIf course8 >= 45 Then
TextBox24.Text = "D"
score8 = 2 * unit8
ElseIf course8 >= 40 Then
TextBox24.Text = "E"
score8 = 1 * unit8
Else
TextBox24.Text = "F"
score8 = 0 * unit8
End If
TextBox25.Text = totalscore
TextBox26.Text = gradepoint
TextBox27.Text = totalunits
End Sub
End Sub
End Sub
Private Sub Label26_Click(sender As Object, e As EventArgs) Handles Label26.Click
End Sub
End Class
Problem Specification
Develop a program using VB.net to calculate the semester grade point of a student
Problem Analysis
This program will be collecting from the user the no of courses offered for the
particular semester and would also require the user enters the courses and its
corresponding unit.
The total number of units is computed, and total grade point is also calculated after
user enters grade. It outputs the grade for each course on empty textboxes for the
user to see.
For example if a number above or equals 70 is inputted then the user got an A for
that particular course.
The total grade score is also calculated by multiplying each grade score by the unit
for the particular course.
The Total Grade Point is the sum of the individual grade point.
The Semester Grade point is calculated this:
Total Grade Point acquired / Total Number of Course Units Offered
FLOWCHART
INVALID INPUT
IF SCORES: VALID?
START