Kamis, 05 Maret 2015

Tugas 1 Mata Kuliah Pemrograman Bisnis 1 (Visual Basic)



Selamat Datang di blog saya. Postingan ini merupakan tugas saya Muhammad Akhyarullah dari mata kuliah Lab Pemrograman Bisnis 1. Pada postingan ini saya akan menjelaskan cara membuat satu program mengenai daftar harga Jeans dengan menggunakan program Visual Studio 2008. Langkah-langkah yang harus dilakukan :


1. Penjelasan tentang program ini :

Program ini diperlukan untuk menghitung harga penjualan jeans di sebuah toko. Program ini memudahkan kita untuk mencari total harga pembelian sesudah diberikan diskon.
Berikut cara program tersebut bekerja :

( i ) Pilih merk jeans yang akan dibeli maka akan keluar secara otomatis harga satuan Jeans tersebut



( ii ) Setelah itu masukkan berapa jumlah Jeans yang akan anda beli, kemudian klik tombol Cek Diskon


# keterangan : Tingkat bunga akan otomatis keluar sesuai dengan jumlah pembelian
Tingkat Diskon :
1-4 = 10%
>5 = 15%

( iii ) Untuk mengetahui Total diskon (Rp) langkah selanjutnya adalah klik tombol diskon untuk mengetahui total potongan diskon yang akan anda dapatkan






( iv ) Langkah terakhir adalah untuk pengecekan hasil / Total Harga yang harus anda bayarkan caranya adalah klik tombol Hasil untuk mngecek




( v ) Dibagian terakhir setelah ana selesai mengecek hasil pembelian Jeans akan keluar MessageBox yang tertulis " Terima Kasih atas pembelian anda "



Setelah anda selesai membeli klik tombol Ok untuk keluar dari program ini.


2. Screenshoot Program


1. Nevada = RadioButton1
2. Samurai  = RadioButton2
3. Levi's = RadioButton3
4. Wrangler = RadioButton4
5. Harga = TextBox2
6. Jumlah = TextBox3
7. Tingkat Diskon = TextBox4
8. Total Diskon = TextBox5
9. Total Harga =  TextBox1
10. Cek Diskon = Button2
11. Diskon = Button1
12. Hasil = Button3


3. Source Coding

Public Class Form1
    Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click

    End Sub

    Private Sub Label2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

    End Sub

    Private Sub Label4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label4.Click

    End Sub



    Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        TextBox5.Text = Val(TextBox2.Text * TextBox3.Text) * TextBox4.Text / 100



    End Sub

    Private Sub Label7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label7.Click

    End Sub

    Private Sub RadioButton1_CheckedChanged_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
        TextBox2.Text = "200000"

    End Sub

    Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged
        TextBox2.Text = "300000"
    End Sub

    Private Sub RadioButton3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton3.CheckedChanged
        TextBox2.Text = "400000"
    End Sub

    Private Sub RadioButton4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton4.CheckedChanged
        TextBox2.Text = "500000"
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        If TextBox3.Text <= 4 Then
            TextBox4.Text = 10
        ElseIf TextBox3.Text > 4 Then
            TextBox4.Text = 15
        End If

    End Sub

    Private Sub TextBox4_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox4.TextChanged

    End Sub

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

    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        TextBox1.Text = (TextBox2.Text * TextBox3.Text) - TextBox5.Text
        MsgBox("Terima Kasih Atas Pembelian Anda")
        Close()


    End Sub
End Class



Sekian dan Terima Kasih