Form Program :
Private Sub Form1_Load(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
npm.Items.Add("12110918")
npm.Items.Add("12110900")
npm.Items.Add("12110770")
npm.Items.Add("12110880")
kodes.Items.Add("ME512AN")
kodes.Items.Add("NE11Y")
kodes.Items.Add("Ya5112")
kodes.Items.Add("GU113IO")
komakul.Items.Add("KKTI4303")
komakul.Items.Add("KBTI4306")
komakul.Items.Add("KBTI4303")
komakul.Items.Add("KBTI4305")
Dim i As Integer
For i =
1 To 100
hadir.Items.Add(i)
tugas.Items.Add(i)
uts.Items.Add(i)
uas.Items.Add(i)
Next i
End Sub
Private Sub npm_SelectedIndexChanged(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles
npm.SelectedIndexChanged
Select
npm.Text
Case "12110918"
nama.Text = "Ivana Jovita Maulisa"
jenjang.Text = "S1"
jurusan.Text = "Teknik Informatika"
Case
"12110900"
nama.Text = "Rio Fritz Salomo"
jenjang.Text = "S1"
jurusan.Text = "Sistem Informasi"
Case
"12110770"
nama.Text = "Afrizal Syahputra"
jenjang.Text = "S1"
jurusan.Text = "Manajemen Informatika"
Case
"12110880"
nama.Text = "Hendri"
jenjang.Text = "S1"
jurusan.Text = "Teknik Informatika"
End Select
End Sub
Private Sub kodes_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As
System.EventArgs) Handles
kodes.SelectedIndexChanged
Select Case kodes.Text
Case
"ME512AN"
nades.Text = "Mesran M.Kom"
Case
"NE11Y"
nades.Text = "Nelly Astuti"
Case "Ya5112"
nades.Text = "Yasir Hasan"
Case
"GU113IO"
nades.Text = "Guidio Ginting"
End Select
End Sub
Private Sub komakul_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As
System.EventArgs) Handles
komakul.SelectedIndexChanged
Select Case komakul.Text
Case
"KKTI4303"
makul.Text = "Struktur Data"
Case
"KBTI4306"
makul.Text = "Sistem Operasi"
Case
"KBTI4303"
makul.Text = "Sistem Basis Data"
Case
"KBTI4305"
makul.Text = "Pemograman Visual Basic"
End Select
End Sub
Private Sub btnkeluar_Click(ByVal
sender As System.Object, ByVal e As System.EventArgs)
Handles keluar.Click
End
End Sub
Private Sub btnhapus_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles btnhapus.Click
npm.Text = ""
nama.Text = ""
jenjang.Text = ""
kodes.Text = ""
nades.Text = ""
komakul.Text = ""
makul.Text = ""
hadir.Text = ""
tugas.Text = ""
uts.Text = ""
uas.Text = ""
akhir.Text = ""
huruf.Text = ""
ket.Text = ""
jurusan.Text = ""
End Sub
Private Sub btnproses_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles btnproses.Click
akhir.Text = 0.1 * hadir.Text + 0.3 *
tugas.Text + 0.15 * uts.Text + 0.45 * uas.Text
If
akhir.Text >= 88 Then
huruf.Text = "A"
ElseIf
akhir.Text >= 79 Then
huruf.Text = "B+"
ElseIf
akhir.Text >= 69 Then
huruf.Text = "B"
ElseIf
akhir.Text >= 59 Then
huruf.Text = "C+"
ElseIf
akhir.Text >= 49 Then
huruf.Text = "C"
ElseIf
akhir.Text >= 39 Then
huruf.Text = "D"
ElseIf
akhir.Text >= 29 Then
huruf.Text = "E"
End If
If
akhir.Text >= 65 Then
ket.Text = "Lulus"
ElseIf
akhir.Text <= 65 Then
ket.Text = "Gagal"
End If
End Sub
Private Sub hadir_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As
System.EventArgs) Handles
hadir.SelectedIndexChanged
End Sub
End
Class
Hasil Outputnya :
Tidak ada komentar:
Posting Komentar