UTS LAB PEMOGRAMAN BISNIS 1

Nama              : Muhammad Faruq Syauqi
NPM               : 1306391384
Dosen             : Pak Agus
Mata Kuliah   :  Lab Pemograman Bisnis


FORM NILAI MAHASISWA


Form nilai mahasiswa ini untuk mengetahui apakah nilai mahasiswa lulus atau tidak lulus dan untuk menghitung total nilai mahasiswa tersebut. form ini terdiri dari 17 Label,10 TextBox,2 ComboBox,3 Button,dan 1 PictureBox. dan di namakan seperti di atas.



apabila di jalankan maka form akan seperti di atas.pertama kita isi absen,setelah di pilih maka akan otomatis Nama,NPM,dan Foto mahasiswa tersebut muncul seperti gambar di atas.



kemudian isi kolom Absensi Kehadiran (1-14 pertemuan), isi kolom Tugas,Kuis,UTS,dan UAS. seperti gambar di atas.



setelah mengisi Absensi Mahasiswa,Tugas,Kuis,UTS, dan UAS. kemudian kita klik Button HITUNG. maka di kolom NILAI akan muncul total nilai mahasiswa, di kolom KETERANGAN akan terisi apakah mahasiswa tersebut LULUS/TIDAK LULUS. dan di kolom GRADE akan muncul nilai mahasiswa tersebut.


apabila anda sudah selesai maka klik SELESAI dan akan muncul pesan seperti gambar atas.apabila anda memilih Yes maka akan kembali dalam keadaan sudah di debug,apabila No tidak akan keluar .dan apabila anda ingin memulai kembali maka klik MULAI,dan form akan kembali kosong seperti awal.

CODING

Public Class Form1
    Sub bersih()
        TxtNPM.Text = ""
        TxtNAMAMAHASISWA.Text = ""
        TxtKETERANGAN.Text = ""
        TxtNILAI.Text = ""
        ComboBox1.Text = ""
        TxtGRADE.Text = ""
        ComboBox2.Text = ""
        TxtABSENSI.Text = ""
        TxtTUGAS.Text = ""
        TxtKUIS.Text = ""
        TxtUTS.Text = ""
        TxtUAS.Text = ""
        TxtNPM.Focus()
    End Sub
    Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TxtNPM.TextChanged

    End Sub

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        ComboBox1.Items.Add("Laki-laki")
        ComboBox1.Items.Add("Perempuan")

        ComboBox2.Items.Add("1")
        ComboBox2.Items.Add("2")
        ComboBox2.Items.Add("3")
        ComboBox2.Items.Add("4")
        ComboBox2.Items.Add("5")
        ComboBox2.Items.Add("6")
        ComboBox2.Items.Add("7")
        ComboBox2.Items.Add("8")
        ComboBox2.Items.Add("9")
        ComboBox2.Items.Add("10")
        ComboBox2.Items.Add("11")
        ComboBox2.Items.Add("12")
        ComboBox2.Items.Add("13")
        ComboBox2.Items.Add("14")
        ComboBox2.Items.Add("15")



    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Call bersih()
    End Sub

    Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
        Dim selesai = MsgBox("yakin anda sudah selesai?", MsgBoxStyle.YesNo + MsgBoxStyle.Question)
        If selesai = vbYes Then
            Me.Close()
        End If

    End Sub

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
     
        Dim ABSENSIKEHADIRAN, TUGAS, KUIS, UTS, UAS As Single
        ABSENSIKEHADIRAN = Val(TxtABSENSI.Text)
        TUGAS = Val(TxtTUGAS.Text)
        KUIS = Val(TxtKUIS.Text)
        UTS = Val(TxtUTS.Text)
        UAS = Val(TxtUAS.Text)
        If TxtABSENSI.Text = "" Or TxtTUGAS.Text = "" Or TxtKUIS.Text = "" Or TxtUTS.Text = "" Or TxtUAS.Text = "" Then
            MsgBox("Tolong Lengkapi Nilai Absensi Kehadiran,Tugas,Kuis,UTS,dan UAS Terlebih Dahulu.")
        Else
            ABSENSIKEHADIRAN = 10 * TxtABSENSI.Text / 14
            TxtABSENSI.Text = ABSENSIKEHADIRAN

            TUGAS = 0.2 * TxtTUGAS.Text
            TxtTUGAS.Text = TUGAS

            KUIS = 0.2 * TxtKUIS.Text
            TxtKUIS.Text = KUIS

            UTS = 0.25 * TxtUTS.Text
            TxtUTS.Text = UTS

            UAS = 0.25 * TxtUAS.Text
            TxtUAS.Text = UAS

            TxtNILAI.Text = ABSENSIKEHADIRAN + TUGAS + KUIS + UTS + UAS

        End If

        Dim NILAI As Integer
        If TxtNILAI.Text >= 85 Then
            TxtKETERANGAN.Text = "LULUS"
            TxtGRADE.Text = "A"
        ElseIf TxtNILAI.Text >= 80 Then
            TxtKETERANGAN.Text = "LULUS"
            TxtGRADE.Text = "A-"
        ElseIf TxtNILAI.Text >= 75 Then
            TxtKETERANGAN.Text = "LULUS"
            TxtGRADE.Text = "B+"
        ElseIf TxtNILAI.Text >= 70 Then
            TxtKETERANGAN.Text = "LULUS"
            TxtGRADE.Text = "B"
        ElseIf TxtNILAI.Text >= 65 Then
            TxtKETERANGAN.Text = "LULUS"
            TxtGRADE.Text = "B-"
        ElseIf TxtNILAI.Text >= 60 Then
            TxtKETERANGAN.Text = "LULUS"
            TxtGRADE.Text = "C+"
        ElseIf TxtNILAI.Text >= 55 Then
            TxtKETERANGAN.Text = "LULUS"
            TxtGRADE.Text = "C"
        ElseIf TxtNILAI.Text >= 40 Then
            TxtKETERANGAN.Text = "TIDAK LULUS"
            TxtGRADE.Text = "D"

        Else
            TxtKETERANGAN.Text = "TIDAK LULUS"
            TxtGRADE.Text = "E"
        End If


    End Sub


    Private Sub ComboBox2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox2.SelectedIndexChanged

        Select ComboBox2.Text
            Case 1
                TxtNPM.Text = "1001"
                TxtNAMAMAHASISWA.Text = "ABDULLAH"
                PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage
                PictureBox1.Image = System.Drawing.Image.FromFile("C:\foto2 uts/DSC07794.JPG")
            Case 2
                TxtNPM.Text = "1002"
                TxtNAMAMAHASISWA.Text = "BUNGA"
                PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage
                PictureBox1.Image = System.Drawing.Image.FromFile("C:\foto2 uts/DSC07546.JPG")
            Case 3
                TxtNPM.Text = "1003"
                TxtNAMAMAHASISWA.Text = "CHRIS"
                PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage
                PictureBox1.Image = System.Drawing.Image.FromFile("C:\foto2 uts/DSC07808.JPG")
            Case 4
                TxtNPM.Text = "1004"
                TxtNAMAMAHASISWA.Text = "ERWIN"
                PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage
                PictureBox1.Image = System.Drawing.Image.FromFile("C:\foto2 uts/DSC08235.JPG")
            Case 5
                TxtNPM.Text = "1005"
                TxtNAMAMAHASISWA.Text = "FILZA"
                PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage
                PictureBox1.Image = System.Drawing.Image.FromFile("C:\foto2 uts/DSC07558.JPG")
            Case 6
                TxtNPM.Text = "1006"
                TxtNAMAMAHASISWA.Text = "GILANG"
                PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage
                PictureBox1.Image = System.Drawing.Image.FromFile("C:\foto2 uts/DSC08237.JPG")
            Case 7
                TxtNPM.Text = "1007"
                TxtNAMAMAHASISWA.Text = "HERZI"
                PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage
                PictureBox1.Image = System.Drawing.Image.FromFile("C:\foto2 uts/IMG_4178.JPG")
            Case 8
                TxtNPM.Text = "1008"
                TxtNAMAMAHASISWA.Text = "INTAN"
                PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage
                PictureBox1.Image = System.Drawing.Image.FromFile("C:\foto2 uts/IMG_4837.JPG")
            Case 9
                TxtNPM.Text = "1009"
                TxtNAMAMAHASISWA.Text = "KEMAL"
                PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage
                PictureBox1.Image = System.Drawing.Image.FromFile("C:\foto2 uts/DSC08240.JPG")
            Case 10
                TxtNPM.Text = "1010"
                TxtNAMAMAHASISWA.Text = "RIZKA"
                PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage
                PictureBox1.Image = System.Drawing.Image.FromFile("C:\foto2 uts/P1230291.JPG")
            Case 11
                TxtNPM.Text = "1011"
                TxtNAMAMAHASISWA.Text = "SARAH"
                PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage
                PictureBox1.Image = System.Drawing.Image.FromFile("C:\foto2 uts/P1230300.JPG")
            Case 12
                TxtNPM.Text = "1012"
                TxtNAMAMAHASISWA.Text = "TINTIN"
                PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage
                PictureBox1.Image = System.Drawing.Image.FromFile("C:\foto2 uts/DSC08241.JPG")
            Case 13
                TxtNPM.Text = "1013"
                TxtNAMAMAHASISWA.Text = "TONO"
                PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage
                PictureBox1.Image = System.Drawing.Image.FromFile("C:\foto2 uts/DSC08264.JPG")
            Case 14
                TxtNPM.Text = "1014"
                TxtNAMAMAHASISWA.Text = "URFA"
                PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage
                PictureBox1.Image = System.Drawing.Image.FromFile("C:\foto2 uts/P1230307.JPG")
            Case 15
                TxtNPM.Text = "1015"
                TxtNAMAMAHASISWA.Text = "ZIDANE"
                PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage
                PictureBox1.Image = System.Drawing.Image.FromFile("C:\foto2 uts/P1240051.JPG")


        End Select

    End Sub


SEKIAN TERIMA KASIH

Latest
Previous
Next Post »