TUGAS

TUGAS BAHASA PEMROGRAMAN 1

TUGAS 1

SOURCE CODE TUGAS 1

Private Sub CboGolongan_Click()
Dim Gaji, pajak, Tunjangan, Total As Variant
Select Case CboGolongan.Text
Case “I”
Gaji = 100000
Tunjangan = 10000
Case “II”
Gaji = 200000
Tunjangan = 20000
Case “III”
Gaji = 300000
Tunjangan = 30000
Case “IV”
Gaji = 400000
Tunjangan = 40000
Case Else
Gaji = 0
Tunjangan = 0
End Select
Total = Gaji + tunj
pajak = Total * 0.1
TxtGaji.Text = Gaji
TxtTunj.Text = Tunjangan
TxtPajak.Text = pajak
TxtTotal.Text = Total – pajak
End Sub

Private Sub CmdBatal_Click()
TxtNidn.SetFocus
TxtNidn.Text = “”
TxtNama.Text = “”
CboGolongan.Text = “”
TxtGaji.Text = “”
TxtTunj.Text = “”
TxtPajak.Text = “”
TxtTotal.Text = “”
End Sub

Private Sub CmdKeluar_Click()
Unload Me
End Sub

Private Sub CmdLagi_Click()
TxtNidn.SetFocus
TxtNidn.Text = “”
TxtNama.Text = “”
CboGolongan.Text = “”
TxtGaji.Text = “”
TxtTunj.Text = “”
TxtPajak.Text = “”
TxtTotal.Text = “”
End Sub

Private Sub Form_Load()
CboGolongan.AddItem “I”
CboGolongan.AddItem “II”
CboGolongan.AddItem “III”
CboGolongan.AddItem “IV”
End Sub

Private Sub TxtNidn_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
TxtNama.SetFocus
End If
End Sub

TAMPILAN TUGAS 1

ANGGI 1

ANGGI 1.1

TUGAS 2

SOURCE CODE TUGAS 2

Private Sub CmdBatal_Click()
TxtNama.SetFocus
TxtNama = “”
TxtNpm = “”
TxtJr = “”
TxtPs = “”
TxtMasuk = “”
TxtUrut = “”
End Sub

Private Sub CmdKeluar_Click()
Unload Me
End Sub

Private Sub CmdLagi_Click()
TxtNama.SetFocus
TxtNama = “”
TxtNpm = “”
TxtJr = “”
TxtPs = “”
TxtMasuk = “”
TxtUrut = “”
End Sub

Private Sub CmdProses_Click()
Dim Jurusan, Program, A As String
A = Mid(TxtNpm, 3, 1)
If A = “1” Then
Jurusan = ” Sistem Informasi”

ElseIf A = “2” Then
Jurusan = ” Teknik Informatika”

ElseIf A = “3” Then
Jurusan = ” Manajemen Informatika”

ElseIf A = “4” Then
Jurusan = ” Komputer Akuntansi”
End If
TxtJr = Jurusan
A = Mid(TxtNpm, 4, 2)
If A = “01” Then
Program = “Strata Satu”

ElseIf A = “02” Then
Program = “Diploma Empat”

ElseIf A = “03” Then
Program = “Diploma Tiga”

ElseIf A = “04” Then
Program = “Diploma Dua”
End If

TxtPs = Program
TxtMasuk = “20” & Left(TxtNpm, 2)
TxtUrut = Right(TxtNpm, 3)
End Sub

Private Sub TxtNama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
TxtNpm.SetFocus
End If
End Sub

TAMPILAN TUGAS 2

ANGGI 2

ANGGI 2.1

TUGAS 3

SOURCE CODE TUGAS 3

Private Sub CboKode_Click()
Dim Tipe, Harga, Kode As Variant
Kode = Mid(CboKode.Text, 7, 5)
Select Case Kode
Case “MC965”
Tipe = “Apple MacBook Air MC965”
Harga = “12800000”

Case “MC966”
Tipe = “Apple MacBook Air MC966”
Harga = “15800000”

Case “MC968”
Tipe = “Apple MacBook Air MC968”
Harga = “9900000”

Case “MC969”
Tipe = “Apple MacBook Air MC969”
Harga = “11900000”

Case “MC700”
Tipe = “Apple MacBook Pro MC700”
Harga = “10800000”

Case “MC721”
Tipe = “Apple MacBook Pro MC721”
Harga = “15900000”

Case “MC723”
Tipe = “Apple MacBook Pro MC723”
Harga = “19300000 ”

Case “MC311”
Tipe = “Apple MacBook Pro MC311”
Harga = “24200000 ”

Case ” MC313″
Tipe = “Apple MacBook Pro MC313”
Harga = “11900000”

Case ” MC314″
Tipe = “Apple MacBook Pro MC314”
Harga = “14700000”

Case “MC318”
Tipe = “Apple MacBook Pro MC318”
Harga = “17600000”

Case “MC322”
Tipe = “Apple MacBook Pro MC322 ”
Harga = “21300000”

Case “MC965”
Tipe = “Apple MacBook Air MC965”
Harga = “12800000”

Case “MC96”
Tipe = “Apple MacBook Air MC966 ”
Harga = “15800000 ”
End Select
TxtMerek = Tipe
TxtHs = Harga
TxtJual.SetFocus
End Sub

Private Sub CmdHitung_Click()
CboKode.SetFocus
CboKode = “”
TxtMerek = “”
TxtHs = “”
TxtJual = “”
TxtHp = “”
TxtDis = “”
TxtTotal = “”
End Sub

Private Sub CmdKeluar_Click()
Unload Me
End Sub

Private Sub CmdProses_Click()
TxtHp = Val(TxtJual) * Val(TxtHs)
Select Case TxtHp.Text
Case Is > 30000000
TxtDis = Val(TxtHp) * 0.15
TxtTotal = Val(TxtHp) – Val(TxtDis)

Case Is > 25000000
TxtDis = Val(TxtHp) * 0.1
TxtTotal = Val(TxtHp) – Val(TxtDis)

Case Is > 20000000
TxtDis = Val(TxtHp) * 0.05
TxtTotal = Val(TxtHp) – Val(TxtDis)

Case Is > 15000000
TxtDis = Val(TxtHp) * 0.02
TxtTotal = Val(TxtHp) – Val(TxtDis)
End Select
End Sub

Private Sub Form_Load()
CboKode.AddItem “Apple MC965 MacBook Air”
CboKode.AddItem “Apple MC966 MacBook Air”
CboKode.AddItem “Apple MC968 MacBook Air”
CboKode.AddItem “Apple MC969 MacBook Air”
CboKode.AddItem “Apple MC700 MacBook Pro”
CboKode.AddItem “Apple MC721 MacBook Pro”
CboKode.AddItem “Apple MC723 MacBook Pro”
CboKode.AddItem “Apple MC724 MacBook Pro”
CboKode.AddItem “Apple MC311 MacBook Pro”
CboKode.AddItem “Apple MC313 MacBook Pro”
CboKode.AddItem “Apple MC314 MacBook Pro”
CboKode.AddItem “Apple MC318 MacBook Pro”
CboKode.AddItem “Apple MC322 MacBook Pro”
CboKode.AddItem “Apple MC965 MacBook Air”
CboKode.AddItem “Apple MC966 MacBook Air”
End Sub

TAMPILAN TUGAS  3

ANGGI 3

ANGGI 3.1

TUGAS 4

SOURCE CODE TUGAS 4

Private Sub CboKode_Click()
Dim Tipe, Harga As String
Select Case CboKode.Text
Case “P205”
Tipe = “Pentium II  500 Mega Hz”
Harga = “1500000”

Case “P305”
Tipe = “Pentium III 800 Mega Hz”
Harga = “2100000 ”

Case “P310”
Tipe = “Pentium III  1.0 Giga Hz ”
Harga = “3500000”

Case “P415”
Tipe = “Pentium IV  1.5 Giga Hz”
Harga = “4000000”

Case “P417”
Tipe = “Pentium IV  1.7 Giga Hz”
Harga = “4200000”

Case “P419”
Tipe = “Pentium IV  1.9 Giga Hz”
Harga = “5500000”
End Select
TxtJk = Tipe
TxtHs = Harga
TxtJual.SetFocus
End Sub

Private Sub CmdClose_Click()
Unload Me
End Sub

Private Sub CmdHitung_Click()
CboKode.SetFocus
CboKode = “”
TxtJk = “”
TxtHs = “”
TxtJual = “”
TxtHp = “”
TxtDis = “”
TxtHarga = “”
End Sub

Private Sub CmdProses_Click()
TxtHp = Val(TxtJual) * Val(TxtHs)
Select Case TxtHp.Text
Case Is > 30000000
TxtDis = Val(TxtHp) * 0.15
TxtHarga = Val(TxtHp) – Val(TxtDis)

Case Is > 25000000
TxtDis = Val(TxtHp) * 0.1
TxtHarga = Val(TxtHp) – Val(TxtDis)

Case Is > 20000000
TxtDis = Val(TxtHp) * 0.05
TxtHarga = Val(TxtHp) – Val(TxtDis)

Case Is > 15000000
TxtDis = Val(TxtHp) * 0.02
TxtHarga = Val(TxtHp) – Val(TxtDis)
End Select
End Sub

Private Sub Form_Load()
CboKode.AddItem “P205”
CboKode.AddItem “P305”
CboKode.AddItem “P310”
CboKode.AddItem “P415”
CboKode.AddItem “P417”
CboKode.AddItem “P419”
End Sub

TAMPILAN TUGAS 4

ANGGI 4

ANGGI 4.1

TUGAS 5

SOURCE CODE TUGAS 5

Private Sub CmdBatal_Click()
CboKode.SetFocus
CboKode = “Pilih Kode Buku”
TxtJudul = “”
TxtPengarang = “”
TxtTt = “”
TxtPenerbit = “”
TxtHarga = “”
End Sub

Private Sub CmdKeluar_Click()
Unload Me
End Sub

Private Sub CmdLagi_Click()
CboKode.SetFocus
CboKode = “Pilih Kode Buku”
TxtJudul = “”
TxtPengarang = “”
TxtTt = “”
TxtPenerbit = “”
TxtHarga = “”

End Sub

Private Sub CmdProses_Click()
Dim JudulBuku, Pengarang, Penerbit, Harga As String
TxtTt.Text = “20” & Right(CboKode, 2)
A = Mid(CboKode, 3, 3)
If A = “SIM” Then
JudulBuku = “Sistem Informasi Manajemen”
Pengarang = “Yati Nur Oktavia”
Harga = “75900”

ElseIf A = “EDP” Then
JudulBuku = “Elektronik Data Processing”
Pengarang = “Imam Tarmizi”
Harga = “62000”

ElseIf A = “MNJ” Then
JudulBuku = “Manajemen”
Pengarang = “Valentina Mariana Adiwianti”
Harga = “42000”

ElseIf A = “CDR” Then
JudulBuku = “Corel Draw”
Pengarang = “Riyan Suhandi”
Harga = “53000”

ElseIf A = “RPL” Then
JudulBuku = “Rekayasa Perangkat Lunak”
Pengarang = “Sinta Umpu Singa”
Harga = “83000”
End If

TxtJudul = JudulBuku
TxtPengarang = Pengarang
TxtHarga = Harga
A = Mid(CboKode, 1, 1)
If A = “A” Then
Penerbit = “Andi Offset Yogyakarta”

ElseIf A = “I” Then
Penerbit = “Indah Surabaya”

ElseIf A = “S” Then
Penerbit = “Salemba Empat”

ElseIf A = “E” Then
Penerbit = “Elek Media Komputindo”

ElseIf A = “M” Then
Penerbit = “Maxicom”
End If
TxtPenerbit.Text = Penerbit
End Sub

Private Sub Form_Load()
CboKode.AddItem “A-SIM-01”
CboKode.AddItem “I-EDP-02”
CboKode.AddItem “S-MNJ-03”
CboKode.AddItem “E-CDR-04”
CboKode.AddItem “M-RPL-05”
End Sub

TAMPILAN TUGAS 5

ANGGI 5

ANGGI 5.1

TUGAS 6

SOURCE CODE TUGAS 6

Private Sub CmdKeluar_Click()
Unload Me
End Sub

Private Sub CmdLagi_Click()
TxtKt.SetFocus
TxtKt = “”
TxtHt = “”
TxtJk = “”
TxtJb = “”
TxtJt = “”
TxtTotal = “”
End Sub

Private Sub CmdProses_Click()
Dim Kode, Harga, Jenis, Berangkat As Variant
Kode = Left(TxtKt.Text, 3)
Select Case Kode
Case “BIM”
Harga = 50000
Jenis = “BIMA”
Berangkat = “16.00”
Case “EKO”
Harga = 35000
Jenis = “EKONOMI”
Berangkat = “19.00”
Case “MUT”
Harga = 23000
Jenis = “MUTIARA”
Berangkat = “17.00”
Case “SEN”
Harga = 15000
Jenis = “SENJA”
Berangkat = “20.00”
End Select
TxtHt = Harga
TxtJk = Jenis
TxtJb = Berangkat
TxtJt.SetFocus
End Sub

Private Sub TxtJt_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
TxtTotal = Val(TxtHt.Text) * Val(TxtJt.Text)
End If
End Sub

TAMPILAN TUGAS 6

ANGGI 6

ANGGI 6.1

TUGAS 7

SOURCE CODE TUGAS 7

Private Sub CmdBatal_Click()
TxtKode.SetFocus
TxtKode = “Pilih Kode Buku”
TxtJudul = “”
TxtPengarang = “”
TxtTt = “”
TxtPenerbit = “”
TxtHarga = “”
End Sub

Private Sub CmdKeluar_Click()
Unload Me
End Sub

Private Sub CmdLagi_Click()
TxtKode.SetFocus
TxtKode = “Pilih Kode Buku”
TxtJudul = “”
TxtPengarang = “”
TxtTt = “”
TxtPenerbit = “”
TxtHarga = “”
End Sub

Private Sub CmdProses_Click()
Dim Judul, Pengarang, Penerbit, Harga As String
TxtTt.Text = “20” & Mid(TxtKode, 5, 2)
A = Left(TxtKode, 3)
If A = “SIM” Then
Judul = “Sistem Informasi Manajemen”
Pengarang = “Fadiya Ulfa”
Harga = “75900”

ElseIf A = “EDP” Then
Judul = “Elektronik Data Processing”
Pengarang = “Nurul Agustina”
Harga = “62000”

ElseIf A = “MNJ” Then
Judul = “Manajemen”
Pengarang = “Rian Hidayat”
Harga = “42000”

ElseIf A = “CDR” Then
Judul = “Corel Draw”
Pengarang = “Siti Nur Khotimah”
Harga = “53000”

ElseIf A = “RPL” Then
Judul = “Rekayasa Perangkat Lunak”
Pengarang = “Winda Erlianti”
Harga = “83000”
End If
TxtJudul = Judul
TxtPengarang = Pengarang
TxtHarga = Harga

A = Mid(TxtKode, 8)
If A = “A” Then
Penerbit = “Andi Offset Yogyakarta”

ElseIf A = “I” Then
Penerbit = “Indah Surabaya”

ElseIf A = “S” Then
Penerbit = “Salemba Empat”

ElseIf A = “E” Then
Penerbit = “Elek Media Komputindo”

ElseIf A = “M” Then
Penerbit = “Maxicom”
End If
TxtPenerbit.Text = Penerbit
End Sub

Private Sub TxtKode_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(UCase(Chr(KeyAscii)))
End Sub

TAMPILAN TUGAS 7

ANGGI 7

ANGGI 7.1

TUGAS 8

SOURCE CODE TUGAS 8

Private Sub Cmdbatal_Click()
Txtnama.SetFocus
Txtnama = “”
Txtnik = “”
TxtGolongan = “”
TxtKodestatus = “”
Txtstatus = “”
Txttahun = “”
Txtjabatan = “”
Txtbagian = “”
TxtGajipokok = “”
Txttunjangan = “”
TxtTotalGaji = “”
End Sub

Private Sub Cmdkeluar_Click()
Unload Me
End Sub

Private Sub Cmdlagi_Click()
Txtnama.SetFocus
Txtnama = “”
Txtnik = “”
TxtGolongan = “”
TxtKodestatus = “”
Txtstatus = “”
Txttahun = “”
Txtjabatan = “”
Txtbagian = “”
TxtGajipokok = “”
Txttunjangan = “”
TxtTotalGaji = “”
End Sub

Private Sub Cmdproses_Click()
Dim Golongan, KodeBagian, KodeStatus, Status, Tahun, Jabatan, Bagian, GajiPokok, Tunjangan As Variant
Golongan = Mid(Txtnik.Text, 5, 1)
TxtGolongan = Golongan
KodeStatus = Mid(Txtnik.Text, 7, 1)
TxtKodestatus = KodeStatus

If KodeStatus = “S” Then
Status = “Single”
ElseIf KodeStatus = “M” Then
Status = “Menikah”
ElseIf KodeStatus = “J” Then
Status = “Janda”
ElseIf KodeStatus = “D” Then
Status = “Duda”
End If
Txtstatus = Status

Tahun = Left(Txtnik.Text, 4)
Txttahun = Tahun
Select Case Golongan
Case “A”
Jabatan = “Manager”
GajiPokok = 4000000
Tunjangan = 1025000
Case “B”
Jabatan = “Ka. Seksi”
GajiPokok = 3500000
Tunjangan = 975000
Case “C”
Jabatan = “Staff”
GajiPokok = 3000000
Tunjangan = 925000
End Select
Txtjabatan = Jabatan
TxtGajipokok = GajiPokok
Txttunjangan = Tunjangan

KodeBagian = Right(Txtnik.Text, 3)
Select Case KodeBagian
Case “KEU”
Bagian = “Accounting”
Case “ADM”
Bagian = “Administrasi”
Case “SDM”
Bagian = “General Affair”
Case “EDP”
Bagian = “IT Unit”
Case “SPM”
Bagian = “Security”
End Select
Txtbagian = Bagian
TxtTotalGaji = GajiPokok + Tunjangan
End Sub

Private Sub Form_Activate()
Txtnama.SetFocus
End Sub

Private Sub Txtnama_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Txtnik.SetFocus
End If
End Sub

TAMPILAN TUGAS 8

ANGGI 8

ANGGI 8.1

Iklan

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout /  Ubah )

Foto Google+

You are commenting using your Google+ account. Logout /  Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout /  Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout /  Ubah )

w

Connecting to %s