form design:
listing program:
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Npm.Items.Add("12110880")
Npm.Items.Add("12110900")
Npm.Items.Add("12110918")
Npm.Items.Add("12110770")
KD_Dosen.Items.Add("KRS001")
KD_Dosen.Items.Add("MSR002")
KD_Dosen.Items.Add("NL003")
KD_Dosen.Items.Add("SNR004")
KDM.Items.Add("KKTI4303")
KDM.Items.Add("KBTI4306")
KDM.Items.Add("KBTI4303")
KDM.Items.Add("KBTI4305")
Dim i As Integer
For i = 1 To 100
N_Hadir.Items.Add(i)
N_Tugas.Items.Add(i)
N_UTS.Items.Add(i)
N_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 "12110880"
Nama.Text = "Hendri"
Jenjang.Text = "S1"
Jurusan.Text = "Teknik Informatika"
Case "12110900"
Nama.Text = "Rio Frizt Salomo"
Jenjang.Text = "S1"
Jurusan.Text = "Sistem Informasi"
Case "12110918"
Nama.Text = "Ivana Jovita Butar-butar"
Jenjang.Text = "S1"
Jurusan.Text = "Manajemen Informatika"
Case "12110770"
Nama.Text = "Afrizal Syahputra"
Jenjang.Text = "S1"
Jurusan.Text = "Teknik Informatika"
End Select
End Sub
Private Sub KD_Dosen_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KD_Dosen.SelectedIndexChanged
Select Case KD_Dosen.Text
Case "KRS001"
Nama_Dosen.Text = "Kristian Siregar S.Kom"
Case "MSR002"
Nama_Dosen.Text = "Mesran M.Kom"
Case "Nl003"
Nama_Dosen.Text = "Nelly Astuti M.Kom"
Case "SNR004"
Nama_Dosen.Text = "Sinar Sinurat M.Kom"
End Select
End Sub
Private Sub KDM_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KDM.SelectedIndexChanged
Select Case KDM.Text
Case "KKTI4303"
Matakuliah.Text = "Struktur Data"
Case "KBTI4306"
Matakuliah.Text = "Sistem Operasi"
Case "KBTI4303"
Matakuliah.Text = "Sistem Basis Data"
Case "KBTI4305"
Matakuliah.Text = "Pemograman Visual Basic"
End Select
End Sub
Private Sub Hapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Hapus.Click
Npm.Text = ""
Nama.Text = ""
Jenjang.Text = ""
KD_Dosen.Text = ""
Nama_Dosen.Text = ""
KDM.Text = ""
Matakuliah.Text = ""
N_Hadir.Text = ""
N_Tugas.Text = ""
N_UTS.Text = ""
N_UAS.Text = ""
N_Akhir.Text = ""
N_Huruf.Text = ""
Ket.Text = ""
Jurusan.Text = ""
End Sub
Private Sub Keluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Keluar.Click
End
End Sub
Private Sub Proses_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Proses.Click
N_Akhir.Text = 0.1 * N_Hadir.Text + 0.3 * N_Tugas.Text + 0.15 * N_UTS.Text + 0.45 * N_UAS.Text
If N_Akhir.Text >= 88 Then
N_Huruf.Text = "A"
ElseIf N_Akhir.Text >= 79 Then
N_Huruf.Text = "B+"
ElseIf N_Akhir.Text >= 69 Then
N_Huruf.Text = "B"
ElseIf N_Akhir.Text >= 59 Then
N_Huruf.Text = "C+"
ElseIf N_Akhir.Text >= 49 Then
N_Huruf.Text = "C"
ElseIf N_Akhir.Text >= 39 Then
N_Huruf.Text = "D"
ElseIf N_Akhir.Text >= 29 Then
N_Huruf.Text = "E"
End If
If N_Akhir.Text >= 65 Then
Ket.Text = "Lulus"
ElseIf N_Akhir.Text <= 65 Then
Ket.Text = "Gagal"
End If
End Sub
End Class
Hasil Output:
listing program:
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Npm.Items.Add("12110880")
Npm.Items.Add("12110900")
Npm.Items.Add("12110918")
Npm.Items.Add("12110770")
KD_Dosen.Items.Add("KRS001")
KD_Dosen.Items.Add("MSR002")
KD_Dosen.Items.Add("NL003")
KD_Dosen.Items.Add("SNR004")
KDM.Items.Add("KKTI4303")
KDM.Items.Add("KBTI4306")
KDM.Items.Add("KBTI4303")
KDM.Items.Add("KBTI4305")
Dim i As Integer
For i = 1 To 100
N_Hadir.Items.Add(i)
N_Tugas.Items.Add(i)
N_UTS.Items.Add(i)
N_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 "12110880"
Nama.Text = "Hendri"
Jenjang.Text = "S1"
Jurusan.Text = "Teknik Informatika"
Case "12110900"
Nama.Text = "Rio Frizt Salomo"
Jenjang.Text = "S1"
Jurusan.Text = "Sistem Informasi"
Case "12110918"
Nama.Text = "Ivana Jovita Butar-butar"
Jenjang.Text = "S1"
Jurusan.Text = "Manajemen Informatika"
Case "12110770"
Nama.Text = "Afrizal Syahputra"
Jenjang.Text = "S1"
Jurusan.Text = "Teknik Informatika"
End Select
End Sub
Private Sub KD_Dosen_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KD_Dosen.SelectedIndexChanged
Select Case KD_Dosen.Text
Case "KRS001"
Nama_Dosen.Text = "Kristian Siregar S.Kom"
Case "MSR002"
Nama_Dosen.Text = "Mesran M.Kom"
Case "Nl003"
Nama_Dosen.Text = "Nelly Astuti M.Kom"
Case "SNR004"
Nama_Dosen.Text = "Sinar Sinurat M.Kom"
End Select
End Sub
Private Sub KDM_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KDM.SelectedIndexChanged
Select Case KDM.Text
Case "KKTI4303"
Matakuliah.Text = "Struktur Data"
Case "KBTI4306"
Matakuliah.Text = "Sistem Operasi"
Case "KBTI4303"
Matakuliah.Text = "Sistem Basis Data"
Case "KBTI4305"
Matakuliah.Text = "Pemograman Visual Basic"
End Select
End Sub
Private Sub Hapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Hapus.Click
Npm.Text = ""
Nama.Text = ""
Jenjang.Text = ""
KD_Dosen.Text = ""
Nama_Dosen.Text = ""
KDM.Text = ""
Matakuliah.Text = ""
N_Hadir.Text = ""
N_Tugas.Text = ""
N_UTS.Text = ""
N_UAS.Text = ""
N_Akhir.Text = ""
N_Huruf.Text = ""
Ket.Text = ""
Jurusan.Text = ""
End Sub
Private Sub Keluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Keluar.Click
End
End Sub
Private Sub Proses_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Proses.Click
N_Akhir.Text = 0.1 * N_Hadir.Text + 0.3 * N_Tugas.Text + 0.15 * N_UTS.Text + 0.45 * N_UAS.Text
If N_Akhir.Text >= 88 Then
N_Huruf.Text = "A"
ElseIf N_Akhir.Text >= 79 Then
N_Huruf.Text = "B+"
ElseIf N_Akhir.Text >= 69 Then
N_Huruf.Text = "B"
ElseIf N_Akhir.Text >= 59 Then
N_Huruf.Text = "C+"
ElseIf N_Akhir.Text >= 49 Then
N_Huruf.Text = "C"
ElseIf N_Akhir.Text >= 39 Then
N_Huruf.Text = "D"
ElseIf N_Akhir.Text >= 29 Then
N_Huruf.Text = "E"
End If
If N_Akhir.Text >= 65 Then
Ket.Text = "Lulus"
ElseIf N_Akhir.Text <= 65 Then
Ket.Text = "Gagal"
End If
End Sub
End Class
Hasil Output: