Public Class Form1
Private Sub NPM_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NPM.SelectedIndexChanged
If NPM.Text = "13110870" Then
Nama.Text = "sundari"
ElseIf NPM.Text = "13110871" Then
Nama.Text = "riri"
ElseIf NPM.Text = "13110873" Then
Nama.Text = "sun"
ElseIf NPM.Text = "13110872" Then
Nama.Text = "rezky"
End If
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
NPM.Items.Add("13110870")
NPM.Items.Add("13110871")
NPM.Items.Add("13110872")
NPM.Items.Add("13110873")
NPM.Items.Add("13110874")
Matakuliah.Items.Add("sistem operasi")
Matakuliah.Items.Add("sistem basis data")
Matakuliah.Items.Add("matriks dan transpormasi linier")
Matakuliah.Items.Add("pemograman visual")
Matakuliah.Items.Add("arsitektur dan organisasi komputer")
Matakuliah.Items.Add("komunikasi data")
Matakuliah.Items.Add("struktur data")
For i = 100 To 1 Step -5
nilaimid.Items.Add(i)
nilaisemester.Items.Add(i)
Next
End Sub
Private Sub nilaiakhir_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles nilaiakhir.TextChanged
End Sub
Private Sub btnproses_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnproses.Click
nilaiakhir.Text = 0.4 * nilaimid.Text + 0.6 * nilaisemester.Text
If nilaiakhir.Text >= 80 Then
nilaihuruf.Text = "A"
ElseIf nilaiakhir.Text >= 70 Then
nilaihuruf.Text = "B"
ElseIf nilaiakhir.Text >= 60 Then
nilaihuruf.Text = "C"
ElseIf nilaiakhir.Text >= 50 Then
nilaihuruf.Text = "D"
Else
nilaihuruf.Text = "E"
End If
End Sub
Private Sub btnhapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnhapus.Click
NPM.Text = ""
Nama.Text = ""
Matakuliah.Text = ""
nilaimid.Text = ""
nilaisemester.Text = ""
nilaiakhir.Text = ""
nilaihuruf.Text = ""
End Sub
Private Sub btnkeluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnkeluar.Click
Me.Close()
End Sub
End Class
Tidak ada komentar:
Posting Komentar