Listing Program:
Public Class Form2
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim i As Integer
NPM.Items.Add("07301191")
NPM.Items.Add("09102009")
Kode_Dosen.Items.Add("001")
Kode_Dosen.Items.Add("002")
Kode_MataKuliah.Items.Add("00A")
Kode_MataKuliah.Items.Add("00B")
For i = 100 To 1 Step -5
Nilai_kehadiran.Items.Add(i)
Nilai_Tugas.Items.Add(i)
Nilai_UTS.Items.Add(i)
Nilai_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
Dim je As String = Microsoft.VisualBasic.Mid(NPM.Text, 3, 1)
Dim ju As String = Microsoft.VisualBasic.Mid(NPM.Text, 4, 2)
Select Case NPM.Text
Case "07301191"
Nama.Text = "Rudiansyah"
Case "09102009"
Nama.Text = "Paijo Sinaga"
End Select
Select Case je
Case "1"
Jenjang.Text = "Diploma I"
Case "3"
Jenjang.Text = "Diploma III"
Case "4"
Jenjang.Text = "Strata I"
End Select
Select Case ju
Case "01"
jurusan.Text = "Manajemen Informatika"
Case "02"
jurusan.Text = "Sistem Informasi"
Case "03"
jurusan.Text = "Teknik Komputer"
Case "04"""
jurusan.Text = "Akuntansi"
End Select
End Sub
Private Sub Kode_Dosen_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Kode_Dosen.SelectedIndexChanged
Select Case Kode_Dosen.Text
Case "001"
Nama_dosen.Text = "Mesran, M.Kom"
Case "002"
Nama_dosen.Text = "Kristian Siregar S.kom"
End Select
End Sub
Private Sub Kode_MataKuliah_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Kode_MataKuliah.SelectedIndexChanged
Select Case Kode_MataKuliah.Text
Case "00A"
Nama_Matakuliah.Text = "Visual Basic"
Case "00B"
Nama_Matakuliah.Text = "HTML"
End Select
End Sub
Private Sub Btn_Proses_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btn_Proses.Click
Nilai_akhir.Text = Val(0.1 * Nilai_kehadiran.Text) + Val(0.15 * Nilai_Tugas.Text) + Val(0.3 * Nilai_UTS.Text) + Val(0.45 * Nilai_UAS.Text)
If Nilai_akhir.Text >= 50 Then
Keterangan.Text = "Lulus"
Else
Keterangan.Text = "Tidak Lulus"
End If
If Nilai_akhir.Text >= 80 Then
Nilai_huruf.Text = "A"
ElseIf Nilai_akhir.Text >= 70 Then
Nilai_huruf.Text = "B"
ElseIf Nilai_akhir.Text >= 60 Then
Nilai_huruf.Text = "C"
ElseIf Nilai_akhir.Text >= 50 Then
Nilai_huruf.Text = "D"
Else
Nilai_huruf.Text = "E"
End If
End Sub
Private Sub Btn_Hapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btn_Hapus.Click
NPM.Text = ""
Nama.Text = ""
Jenjang.Text = ""
jurusan.Text = ""
Kode_Dosen.Text = ""
Nama_dosen.Text = ""
Kode_MataKuliah.Text = ""
Nama_Matakuliah.Text = ""
Nilai_kehadiran.Text = ""
Nilai_Tugas.Text = ""
Nilai_UTS.Text = ""
Nilai_UAS.Text = ""
Nilai_akhir.Text = ""
Nilai_huruf.Text = ""
Keterangan.Text = ""
End Sub
Private Sub Btn_Keluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btn_Keluar.Click
End
End Sub
End Class
Hasil Dari Program :
Tidak ada komentar:
Posting Komentar