Perhitungan nilai mahasiswa
berikut unu adalah langkah langkah membuat perhitungan nilai mahasiswa
1. buatlah form nya terlebih dahuhlu ,lalu desain dan ganti nama dan textnya pada propertis di setiap label,teksbos,combobox,dan button singkat saja agar tidak membingungkan kita nantinya saat menuliskan syntaksnya
2. selanjutnya isikan syntaksnya sesuai tempanya masing masing seperti dibawah ini
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
npm.Items.Add("12110631")
npm.Items.Add("12110636")
npm.Items.Add("12110641")
npm.Items.Add("12110643")
npm.Items.Add("12110666")
npm.Items.Add("12110917")
kodos.Items.Add("MS004303")
kodos.Items.Add("YS004306")
kodos.Items.Add("TL004307")
kodos.Items.Add("MN004305")
kodos.Items.Add("MP004304")
kodos.Items.Add("PS004309")
komaku.Items.Add("SD03")
komaku.Items.Add("SO03")
komaku.Items.Add("SBD03")
komaku.Items.Add("PV03")
komaku.Items.Add("MTL02")
komaku.Items.Add("KD02")
Dim x As Integer
For x = 100 To 1 Step -1
keha.Items.Add(x)
nitu.Items.Add(x)
niut.Items.Add(x)
niua.Items.Add(x)
Next
End Sub
Private Sub npm_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles npm.SelectedIndexChanged
Select Case npm.Text
Case "12110631"
nama.Text = "lukman wijaya"
juru.Text = "Teknik Informatika"
jenjang.Text = "S1"
Case "12110636"
nama.Text = "Dini Audina"
juru.Text = "Sistem Informasi"
jenjang.Text = "S1"
Case "12110641"
nama.Text = "Hidayat"
juru.Text = "Manajemen"
jenjang.Text = "PASKA SARJANA"
Case "12110643"
nama.Text = "Suhendrik"
juru.Text = "Akutansi"
jenjang.Text = "DI"
Case "12110666"
nama.Text = "Bagus Darwanto"
juru.Text = "Teknk Industri"
jenjang.Text = "DIII"
Case "12110917"
nama.Text = "Suhairi Triyadhi"
juru.Text = "Teknik Informatika"
jenjang.Text = "S1"
End Select
End Sub
Private Sub kodos_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles kodos.SelectedIndexChanged
Select Case kodos.Text
Case "MS004303"
nados.Text = "marzuki sinambela s.kom, m.kom "
Case "YS004306"
nados.Text = "yasir hasan s.kom, m.kom "
Case "TL004307"
nados.Text = "tonni limbong s.kom, m.kom "
Case "MP004304"
nados.Text = "megaria purba s.si, m.kom "
Case "MN004305"
nados.Text = "mesran s.kom, m.kom "
Case "PS004309"
nados.Text = "priswanto s.kom, m.kom "
End Select
End Sub
Private Sub komaku_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles komaku.SelectedIndexChanged
Select Case komaku.Text
Case "SD03"
maku.Text = "Struktur Data"
Case "SO03"
maku.Text = "Sistem Operasi"
Case "SBD03"
maku.Text = "Sistem Basis Data"
Case "PV03"
maku.Text = "Pemograman Visual"
Case "MTL02"
maku.Text = "Matriks dan Transformasi Linier"
Case "KD02"
maku.Text = "Komunikasi Data"
End Select
End Sub
Private Sub Btnproses_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnproses.Click
niak.Text = 0.1 * keha.Text + 0.15 * nitu.Text + 0.35 * niut.Text + 0.4 * niua.Text
If niak.Text >= 50 Then
ket.Text = "Lulus"
Else
ket.Text = "Gagal"
End If
If niak.Text >= 80 Then
nihu.Text = "A"
ElseIf niak.Text >= 70 Then
nihu.Text = "B"
ElseIf niak.Text >= 60 Then
nihu.Text = "C"
ElseIf niak.Text >= 50 Then
nihu.Text = "D"
Else
nihu.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 = ""
jenjang.Text = ""
kodos.Text = ""
nados.Text = ""
komaku.Text = ""
maku.Text = ""
keha.Text = ""
nitu.Text = ""
niut.Text = ""
niua.Text = ""
niak.Text = ""
nihu.Text = ""
juru.Text = ""
ket.Text = ""
End Sub
Private Sub Btnkeluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnkeluar.Click
End
End Sub
End Class
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
npm.Items.Add("12110631")
npm.Items.Add("12110636")
npm.Items.Add("12110641")
npm.Items.Add("12110643")
npm.Items.Add("12110666")
npm.Items.Add("12110917")
kodos.Items.Add("MS004303")
kodos.Items.Add("YS004306")
kodos.Items.Add("TL004307")
kodos.Items.Add("MN004305")
kodos.Items.Add("MP004304")
kodos.Items.Add("PS004309")
komaku.Items.Add("SD03")
komaku.Items.Add("SO03")
komaku.Items.Add("SBD03")
komaku.Items.Add("PV03")
komaku.Items.Add("MTL02")
komaku.Items.Add("KD02")
Dim x As Integer
For x = 100 To 1 Step -1
keha.Items.Add(x)
nitu.Items.Add(x)
niut.Items.Add(x)
niua.Items.Add(x)
Next
End Sub
Private Sub npm_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles npm.SelectedIndexChanged
Select Case npm.Text
Case "12110631"
nama.Text = "lukman wijaya"
juru.Text = "Teknik Informatika"
jenjang.Text = "S1"
Case "12110636"
nama.Text = "Dini Audina"
juru.Text = "Sistem Informasi"
jenjang.Text = "S1"
Case "12110641"
nama.Text = "Hidayat"
juru.Text = "Manajemen"
jenjang.Text = "PASKA SARJANA"
Case "12110643"
nama.Text = "Suhendrik"
juru.Text = "Akutansi"
jenjang.Text = "DI"
Case "12110666"
nama.Text = "Bagus Darwanto"
juru.Text = "Teknk Industri"
jenjang.Text = "DIII"
Case "12110917"
nama.Text = "Suhairi Triyadhi"
juru.Text = "Teknik Informatika"
jenjang.Text = "S1"
End Select
End Sub
Private Sub kodos_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles kodos.SelectedIndexChanged
Select Case kodos.Text
Case "MS004303"
nados.Text = "marzuki sinambela s.kom, m.kom "
Case "YS004306"
nados.Text = "yasir hasan s.kom, m.kom "
Case "TL004307"
nados.Text = "tonni limbong s.kom, m.kom "
Case "MP004304"
nados.Text = "megaria purba s.si, m.kom "
Case "MN004305"
nados.Text = "mesran s.kom, m.kom "
Case "PS004309"
nados.Text = "priswanto s.kom, m.kom "
End Select
End Sub
Private Sub komaku_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles komaku.SelectedIndexChanged
Select Case komaku.Text
Case "SD03"
maku.Text = "Struktur Data"
Case "SO03"
maku.Text = "Sistem Operasi"
Case "SBD03"
maku.Text = "Sistem Basis Data"
Case "PV03"
maku.Text = "Pemograman Visual"
Case "MTL02"
maku.Text = "Matriks dan Transformasi Linier"
Case "KD02"
maku.Text = "Komunikasi Data"
End Select
End Sub
Private Sub Btnproses_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnproses.Click
niak.Text = 0.1 * keha.Text + 0.15 * nitu.Text + 0.35 * niut.Text + 0.4 * niua.Text
If niak.Text >= 50 Then
ket.Text = "Lulus"
Else
ket.Text = "Gagal"
End If
If niak.Text >= 80 Then
nihu.Text = "A"
ElseIf niak.Text >= 70 Then
nihu.Text = "B"
ElseIf niak.Text >= 60 Then
nihu.Text = "C"
ElseIf niak.Text >= 50 Then
nihu.Text = "D"
Else
nihu.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 = ""
jenjang.Text = ""
kodos.Text = ""
nados.Text = ""
komaku.Text = ""
maku.Text = ""
keha.Text = ""
nitu.Text = ""
niut.Text = ""
niua.Text = ""
niak.Text = ""
nihu.Text = ""
juru.Text = ""
ket.Text = ""
End Sub
Private Sub Btnkeluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnkeluar.Click
End
End Sub
End Class
3. jika telah selesai,selanjutnya jalankan aplikasinya dengan cara menekan"F5" atau menekan ikon play pada menubar ,jika masih terdapat eror perbaiki terlebih dahulu karna aplikasi tidak akan mau berjalan jika masih terdapan syntaks yang masih eror,
maka hasilnya akan seperti ini :
0 komentar:
Posting Komentar