QUIZ ONLINE NO.1

Image

Berikut design Form  dan listing Program :

Public Class Form1

    Sub BuatTabel()

        LV.Columns.Add(“NPM”, 50, HorizontalAlignment.Center)

        LV.Columns.Add(“Nama”, 150, HorizontalAlignment.Left)

        LV.Columns.Add(“Jenjang”, 50, HorizontalAlignment.Left)

        LV.Columns.Add(“Jurusan”, 150, HorizontalAlignment.Left)

        LV.Columns.Add(“Kode Dosen”, 50, HorizontalAlignment.Left)

        LV.Columns.Add(“Nama Dosen”, 150, HorizontalAlignment.Left)

        LV.Columns.Add(“Kode Mata Kuliah”, 50, HorizontalAlignment.Left)

        LV.Columns.Add(“Mata Kuliah”, 150, HorizontalAlignment.Left)

        LV.Columns.Add(“Nilai Kehadiran”, 50, HorizontalAlignment.Left)

        LV.Columns.Add(“Nilai Tugas”, 50, HorizontalAlignment.Left)

        LV.Columns.Add(“Nilai UTS”, 50, HorizontalAlignment.Left)

        LV.Columns.Add(“Nilai UAS”, 50, HorizontalAlignment.Left)

        LV.Columns.Add(“Nilai Akhir”, 50, HorizontalAlignment.Left)

        LV.Columns.Add(“Nilai Huruf”, 50, HorizontalAlignment.Left)

        LV.Columns.Add(“Keterangan”, 50, HorizontalAlignment.Left)

        LV.View = View.Details

        LV.GridLines = True

        LV.FullRowSelect = True

    End Sub

    Sub IsiTabel()

        Dim Lst As New ListViewItem

        Lst.Text = npm.Text

        Lst.SubItems.Add(namamhs.Text)

        Lst.SubItems.Add(jenjang.Text)

        Lst.SubItems.Add(jurusan.Text)

        Lst.SubItems.Add(kddosen.Text)

        Lst.SubItems.Add(nmdosen.Text)

        Lst.SubItems.Add(kdmtkuliah.Text)

        Lst.SubItems.Add(mtkuliah.Text)

        Lst.SubItems.Add(nilaikehadiran.Text)

        Lst.SubItems.Add(nilaitugas.Text)

        Lst.SubItems.Add(nilaiuts.Text)

        Lst.SubItems.Add(nilaiuas.Text)

        Lst.SubItems.Add(nilaiakhir.Text)

        Lst.SubItems.Add(nilaihuruf.Text)

        Lst.SubItems.Add(ket.Text)

        LV.Items.Add(Lst)

    End Sub

 

    Private Sub Label5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label5.Click

 

    End Sub

 

    Private Sub keluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles keluar.Click

        End

    End Sub

 

    Private Sub hapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles hapus.Click

        npm.Text = “”

        namamhs.Text = “”

        jenjang.Text = “”

        jurusan.Text = “”

        kddosen.Text = “”

        nmdosen.Text = “”

        kdmtkuliah.Text = “”

        mtkuliah.Text = “”

        nilaikehadiran.Text = “”

        nilaitugas.Text = “”

        nilaiuts.Text = “”

        nilaiuas.Text = “”

        nilaiakhir.Text = “”

        nilaihuruf.Text = “”

        ket.Text = “”

    End Sub

 

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        npm.Items.Add(“081213”)

        npm.Items.Add(“081214”)

        npm.Items.Add(“081215”)

        kddosen.Items.Add(“012”)

        kddosen.Items.Add(“013”)

        kddosen.Items.Add(“014”)

        kdmtkuliah.Items.Add(“TI01”)

        kdmtkuliah.Items.Add(“TI02”)

        kdmtkuliah.Items.Add(“TI03”)

 

        Dim x As Byte

        For x = 10 To 100

            nilaikehadiran.Items.Add(x)

            nilaitugas.Items.Add(x)

            nilaiuts.Items.Add(x)

            nilaiuas.Items.Add(x)

        Next

 

        BuatTabel()

    End Sub

 

    Private Sub npm_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles npm.SelectedIndexChanged

        Select Case npm.Text

            Case “121113”

                namamhs.Text = “Deni Priadi La’ia”

                jenjang.Text = “Diploma I”

                jurusan.Text = “Sistem Informasi”

            Case “121114”

                namamhs.Text = “Ucok”

                jenjang.Text = “Diploma III”

                jurusan.Text = “Manejemen Informasi”

            Case “121115”

                namamhs.Text = “Deni La’ia”

                jenjang.Text = “Strata I”

                jurusan.Text = “Teknik Informasi”

        End Select

    End Sub

 

    Private Sub kodedosen_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles kddosen.SelectedIndexChanged

        Select Case kddosen.Text

            Case “0012”

                nmdosen.Text = “Mesran”

            Case “0013”

                nmdosen.Text = “Alex”

            Case “0014”

                nmdosen.Text = “harvei”

        End Select

    End Sub

 

    Private Sub kodematakuliah_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles kdmtkuliah.SelectedIndexChanged

        Select Case kdmtkuliah.Text

            Case “TI01”

                mtkuliah.Text = “Pemograman Visual”

            Case “TI02”

                mtkuliah.Text = “Sistem Basis Data”

            Case “TI03”

                mtkuliah.Text = “Database”

        End Select

    End Sub

 

    Private Sub proses_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles proses.Click

        nilaiakhir.Text = 0.1 * nilaikehadiran.Text + 0.15 * nilaitugas.Text + 0.3 * nilaiuts.Text + 0.45 * nilaiuas.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

 

        If nilaiakhir.Text >= 60 Then

            ket.Text = “LULUS”

        Else

            ket.Text = “GAGAL”

        End If

    End Sub

 

    Private Sub simpankelistview_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles simpankelistview.Click

        IsiTabel()

        npm.Text = “”

        namamhs.Text = “”

        jenjang.Text = “”

        jurusan.Text = “”

        kddosen.Text = “”

        nmdosen.Text = “”

        kdmtkuliah.Text = “”

        mtkuliah.Text = “”

        nilaikehadiran.Text = “”

        nilaitugas.Text = “”

        nilaiuts.Text = “”

        nilaiuas.Text = “”

        nilaiakhir.Text = “”

        nilaihuruf.Text = “”

        ket.Text = “”

 

 

    End Sub

 

    Private Sub hapusdataygdipilih_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles hapusdataygdipilih.Click

        LV.Items.Remove(LV.SelectedItems(0))

    End Sub

 

    Private Sub hapussemuadata_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles hapussemuadata.Click

        LV.Items.Clear()

    End Sub

End Class

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s