Sunday, January 29, 2012

QUIS soal 2

SOAL DISINI

GAMBAR 1:
LISTING:
LISTING:
Public Class Form1

    Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles nim.SelectedIndexChanged
        If nim.Text = "0911265" Then
            nama.Text = "yunan hidayat"
        ElseIf nim.Text = "0911280" Then
            nama.Text = "sukasu"
        ElseIf nim.Text = "0911273" Then
            nama.Text = "adajaj"
        ElseIf nim.Text = "0911275" Then
            nama.Text = "fhfh"
        ElseIf nim.Text = "0911278" Then
            nama.Text = "jaka"
        ElseIf nim.Text = "0911285" Then
            nama.Text = "ggsgasg"
        ElseIf nim.Text = "09360027" Then
            nama.Text = "Winda Astari"
        ElseIf nim.Text = "09360028" Then
            nama.Text = "Fiqhi Arta Perdana"
        ElseIf nim.Text = "09360029" Then
            nama.Text = "Annisa Rarasayu"
        ElseIf nim.Text = "09330033" Then
            nama.Text = "Richard Halomoan Simanjuntak"
        End If
    End Sub







    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        nakhir.Text = Val(nabsen.Text * 0.1) + Val(ntugas.Text * 0.2) + Val(nuts.Text * 0.3) + Val(nuas.Text * 0.4)

        If nakhir.Text >= 80 Then
            nhuruf.Text = "A"
        ElseIf nakhir.Text >= 70 And nakhir.Text < 80 Then
            nhuruf.Text = "B"
        ElseIf nakhir.Text >= 60 And nakhir.Text < 70 Then
            nhuruf.Text = "C"
        ElseIf nakhir.Text >= 45 And nakhir.Text < 60 Then
            nhuruf.Text = "D"
        ElseIf nakhir.Text < 45 Then
            nhuruf.Text = "E"
        End If
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        nim.Text = "---------Silahkan Pilih-------"
        nama.Text = ""
        nabsen.Text = ""
        ntugas.Text = ""
        nuts.Text = ""
        nuas.Text = ""
        nakhir.Text = "--"
        nhuruf.Text = "--"
        nim.Focus()
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        Dim f = MsgBox("Apakah anda yakin ingin keluar?", vbYesNo, "KONFIRMASI")
        If f = vbYes Then
            MsgBox("Terimakasih telah menggunakan program ini.", MsgBoxStyle.DefaultButton1, "KONFIRMASI")
            Me.Close()
        ElseIf f = vbNo Then
            Exit Sub
        End If
    End Sub

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

    End Sub
End Class