TUGAS PEMROGRAMAN

TUGAS 1

Private Sub CBatal_Click()

CKODE.SetFocus

CboKode = “Pilih Kode Buku”

CJUDUL = “”

CPENGARANG = “”

CTAHUN = “”

CPENERBIT = “”

CHARGA = “”

End Sub

 

Private Sub CKeluar_Click()

End

End Sub

 

Private Sub CLagi_Click()

CKODE.SetFocus

CboKode = “Pilih Kode Buku”

CJUDUL = “”

CPENGARANG = “”

CTAHUN = “”

CPENERBIT = “”

CHARGA = “”

End Sub

 

Private Sub CProses_Click()

Dim Kode, KodeBuku, KodePenerbit, KodeTahun, Tahun, Penerbit, Judul, Pengarang, Harga As Variant

 

Kode = CKODE

KodeBuku = Mid(Kode, 3, 3)

Select Case KodeBuku

Case “SIM”

Judul = “Sistem Informasi Manajemen”

Pengarang = “Yati Nur Oktavia”

Harga = 75900

Case “EDP”

Judul = “Elektronik Data Processing”

Pengarang = “Imam Tarmizi”

Harga = 62000

Case “MNJ”

Judul = “Manajemen”

Pengarang = “Valentina Mariana Adiwianti”

Harga = 42000

Case “CDR”

Judul = “Corel Draw”

Pengarang = “Riyan Suhandi”

Harga = 53000

Case “RPL”

Judul = “Rekayasa Perangkat Lunak”

Pengarang = “Sinta Umpu Singa”

Harga = 83000

End Select

CJUDUL = Judul

CPENGARANG = Pengarang

CHARGA = Harga

 

KodePenerbit = Left(Kode, 1)

Select Case KodePenerbit

Case “A”

Penerbit = “Andi Offset Yogyakarta”

Case “I”

Penerbit = “Indah Surabaya”

Case “S”

Penerbit = “Indah Surabaya”

Case “E”

Penerbit = “Elek Media Komputindo”

Case “M”

Penerbit = “Maxicom”

End Select

CPENERBIT = Penerbit

 

KodeTahun = Right(Kode, 2)

 

CTAHUN = “20” & KodeTahun

End Sub

 

Private Sub Form_Load()

CKODE.AddItem “A-SIM-01”

CKODE.AddItem “I-EDP-02”

CKODE.AddItem “S-MNJ-03”

CKODE.AddItem “E-CDR-04”

CKODE.AddItem “M-RPL-05”

End Sub

SCREENSHOTS

TUGAS 1

 

TUGAS 2

Private Sub CBatal_Click()

RDKODE.SetFocus

RDKODE = “Pilih Kode Buku”

RDJUDUL = “”

RDPENGARANG = “”

RDTAHUN = “”

RDPENERBIT = “”

RDHARGA = “”

End Sub

 

Private Sub RDKeluar_Click()

End

End Sub

 

Private Sub RDLagi_Click()

RDKODE.SetFocus

RDKODE = “Pilih Kode Buku”

RDJUDUL = “”

RDPENGARANG = “”

RDTAHUN = “”

RDPENERBIT = “”

RDHARGA = “”

End Sub

 

Private Sub RDProses_Click()

Dim Kode, KodeBuku, KodePenerbit, KodeTahun, Tahun, Penerbit, Judul, Pengarang, Harga As Variant

 

Kode = RDKODE

KodeBuku = Left(Kode, 3)

Select Case KodeBuku

Case “SIM”

Judul = “Sistem Informasi Manajemen”

Pengarang = “Fadiya Ulfa”

Harga = 75900

Case “EDP”

Judul = “Elektronik Data Processing”

Pengarang = “Nurul Agustina”

Harga = 62000

Case “MNJ”

Judul = “Manajemen”

Pengarang = “Rian Hidayat”

Harga = 42000

Case “CDR”

Judul = “Corel Draw”

Pengarang = “Siti Nur Khotimah”

Harga = 53000

Case “RPL”

Judul = “Rekayasa Perangkat Lunak”

Pengarang = “Winda Erlianti”

Harga = 83000

End Select

RDJUDUL = Judul

RDPENGARANG = Pengarang

RDHARGA = Harga

 

KodePenerbit = Right(Kode, 1)

Select Case KodePenerbit

Case “A”

Penerbit = “Andi Offset Yogyakarta”

Case “I”

Penerbit = “Indah Surabaya”

Case “S”

Penerbit = “Indah Surabaya”

Case “E”

Penerbit = “Elek Media Komputindo”

Case “M”

Penerbit = “Maxicom”

End Select

RDPENERBIT = Penerbit

 

KodeTahun = Mid(Kode, 5, 2)

Select Case KodeTahun

Case “09”

Tahun = “20” & KodeTahun

Case “10”

Tahun = “20” & KodeTahun

Case “11”

Tahun = “20” & KodeTahun

Case “12”

Tahun = “20” & KodeTahun

Case “13”

Tahun = “20” & KodeTahun

End Select

RDTAHUN = “20” & KodeTahun

End Sub

 

Private Sub Form_Load()

RDKODE.AddItem “SIM-09-A”

RDKODE.AddItem “EDP-10-I”

RDKODE.AddItem “MNJ-11-S”

RDKODE.AddItem “CDR-12-E”

RDKODE.AddItem “RPL-13-M”

End Sub

SCREENSHOTS

TUGAS 2

TUGAS 3

Private Sub cbmkode_Click()

Select Case cbmkode.Text

Case Is = “Apple MC956 MacBook Air”

MERK = “Apple MC956 MacBook Air”

HS = “12800000”

Case Is = “Apple MC966 MacBook Air”

MERK = “Apple MC966 MacBook Air”

HS = “15800000”

Case Is = “Apple MC968 MacBook Air”

MERK = “Apple MC968 MacBook Air”

HS = “9900000”

Case Is = “Apple MC969 MacBook Air”

MERK = “Apple MC969 MacBook Air”

HS = “11900000”

Case Is = “Apple MC700 MacBook Pro”

MERK = “Apple MC700 MacBook Pro”

HS = “10800000”

Case Is = “Apple MC721 MacBook Pro”

MERK = “Apple MC721 MacBook Pro”

HS = “15900000”

Case Is = “Apple MC723 MacBook Pro”

MERK = “Apple MC723 MacBook Pro”

HS = “19300000”

Case Is = “Apple MC724 MacBook Pro”

MERK = “Apple MC724 MacBook Pro”

HS = “13700000”

Case Is = “Apple MC711 MacBook Pro”

MERK = “Apple MC711 MacBook Pro”

HS = “24200000”

Case Is = “Apple MC313 MacBook Pro”

MERK = “Apple MC313 MacBook Pro”

HS = “11900000”

Case Is = “Apple MC314 MacBook Pro”

MERK = “Apple MC314 MacBook Pro”

HS = “14700000”

Case Is = “Apple MC318 MacBook Pro”

MERK = “Apple MC318 MacBook Pro”

HS = “17600000”

Case Is = “Apple MC322 MacBook Pro”

MERK = “Apple MC322 MacBook Pro”

HS = “21300000”

Case Is = “Apple MC965 MacBook Air”

MERK = “Apple MC965 MacBook Air”

HS = “12800000”

Case Is = “Apple MC966 MacBook Air”

MERK = “Apple MC966 MacBook Air”

HS = “15800000”

End Select

MERK.Text = MERK

HS.Text = HS

txtjj.SetFocus

End Sub

Private Sub cmdlagi_Click()

cbmkode.SetFocus

cbmkode.Text = “”

MERK.Text = “”

HS.Text = “”

txtjj.Text = “”

Txthp.Text = “”

txtdis.Text = “”

txttb.Text = “”

End Sub

Private Sub CmdKeluar_Click()

Unload Me

End Sub

Private Sub Cmdproses_Click()

Txthp.Text = Val(HS.Text) * Val(txtjj.Text)

Select Case Txthp.Text

Case Is > 140000000

discount = Val(Txthp.Text) * 0.15

Case Is > 135000000

discount = Val(Txthp.Text) * 0.1

Case Is > 130000000

discount = Val(Txthp.Text) * 0.05

Case Is > 125000000

discount = Val(Txthp.Text) * 0.02

End Select

txtdis.Text = discount

txttb.Text = Val(Txthp.Text) – Val(txtdis.Text)

End Sub

Private Sub Form_Load()

cbmkode.AddItem “Apple MC956 MacBook Air”

cbmkode.AddItem “Apple MC966 MacBook Air”

cbmkode.AddItem “Apple MC968 MacBook Air”

cbmkode.AddItem “Apple MC969 MacBook Air”

cbmkode.AddItem “Apple MC700 MacBook Pro”

cbmkode.AddItem “Apple MC721 MacBook Pro”

cbmkode.AddItem “Apple MC723 MacBook Pro”

cbmkode.AddItem “Apple MC724 MacBook Pro”

cbmkode.AddItem “Apple MC711 MacBook Pro”

cbmkode.AddItem “Apple MC313 MacBook Pro”

cbmkode.AddItem “Apple MC314 MacBook Pro”

cbmkode.AddItem “Apple MC318 MacBook Pro”

cbmkode.AddItem “Apple MC322 MacBook Pro”

cbmkode.AddItem “Apple MC965 MacBook Air”

cbmkode.AddItem “Apple MC966 MacBook Air”

End Sub

 

SCREENSHOTS

TUGAS 3

TUGAS 4

Private Sub cmdlagi_Click()

TxtKT.SetFocus

TxtKT.Text = “”

txtht.Text = “”

txtjk.Text = “”

txtjb.Text = “”

txtjt.Text = “”

txttp.Text = “”

End Sub

Private Sub cmdkeluar_Click()

End

End Sub

Private Sub cmdproses_Click()

Dim kt, jk, jb As String

Dim ht As Currency

kt = Left(TxtKT.Text, 3)

If kt = “BIM” Then

ht = “50000”

jk = “BIMA”

jb = “1600”

ElseIf kt = “EKO” Then

ht = “35000”

jk = “EKONOMI”

jb = “1900”

ElseIf kt = “MUT” Then

ht = “23000”

jk = “MUTIARA”

jb = “1700”

ElseIf kt = “SEN” Then

ht = “15000”

jk = “SENJA”

jb = “2000”

End If

txtht.Text = ht

txtjk.Text = jk

txtjb.Text = jb

txtjt.SetFocus

End Sub

Private Sub Form_Activate()

TxtKT.SetFocus

End Sub

Private Sub txtjt_keypress(keyascii As Integer)

If keyascii = 13 Then

txttp.Text = Val(txtht.Text) * Val(txtjt.Text)

txttp.SetFocus

End If

End Sub

SCREENSHOTS

TUGAS 4

TUGAS 5

Private Sub CBATAL_Click()

RDMNAMA.SetFocus

RDMNAMA.Text = “”

RDMNPM.Text = “”

RDMJURUSAN.Text = “”

RDMPROGRAM.Text = “”

RDMTAHUN.Text = “”

RDMNOMOR.Text = “”

End Sub

 

Private Sub RDMKeluar_Click()

End

End Sub

 

Private Sub RDMLagi_Click()

RDMNAMA.SetFocus

RDMNAMA.Text = “”

RDMNPM.Text = “”

RDMJURUSAN.Text = “”

RDMPROGRAM.Text = “”

RDMTAHUN.Text = “”

RDMNOMOR.Text = “”

End Sub

 

Private Sub RDMProses_Click()

Dim Kode, KodeJurusan, KodePrody, Jurusan, Prody, TahunMasuk, NomorUrut As Variant

 

Kode = RDMNPM

 

TahunMasuk = “20” & Left(Kode, 2)

RDMTAHUN = TahunMasuk

 

KodeJurusan = Mid(Kode, 3, 1)

Select Case KodeJurusan

Case “1”

Jurusan = “Sistem Informasi”

Case “2”

Jurusan = “Teknik Informatika”

Case “3”

Jurusan = “Manajemen Informatika”

Case “4”

Jurusan = “Komputer Akuntansi”

End Select

RDMJURUSAN = Jurusan

 

KodePrody = Mid(Kode, 4, 2)

Select Case KodePrody

Case “01”

Prody = “Strata Satu”

Case “02”

Prody = “Diplomat Empat”

Case “03”

Prody = “Diplomat Tiga”

Case “04”

Prody = “Diplomat Dua”

End Select

RDMPROGRAM = Prody

 

NomorUrut = Right(Kode, 3)

RDMNOMOR = NomorUrut

End Sub

SCREENSHOTS

TUGAS 5

TUGAS 6

Private Sub rdkk_Click()

Dim kk, jk, hs As String

Select Case rdkk.Text

Case “P205”

rdjk.Text = “Pentium II 500 Mega Hz”

rdhs.Text = “1500000”

Case “P308”

rdjk.Text = “Pentium III 800 Mega Hz”

rdhs.Text = “2100000”

Case “P310”

rdjk.Text = “Pentium III 1.0 Giga Hz”

rdhs.Text = “3500000”

Case “P415”

rdjk.Text = “Pentium IV 1.5 Giga Hz”

rdhs.Text = “4000000”

Case “P417”

rdjk.Text = “Pentium IV 1.7 Giga Hz”

rdhs.Text = “4200000”

Case “P419”

rdjk.Text = “Pentium IV 1.9 Mega Hz”

rdhs.Text = “5500000”

End Select

End Sub

Private Sub Cmdlagi_Click()

rdkk.SetFocus

rdkk.Text = “”

rdjk.Text = “”

rdhs.Text = “”

rdjj.Text = “”

rdhp.Text = “”

rddis.Text = “”

rdhb.Text = “”

End Sub

Private Sub Cmdkeluar_Click()

End

End Sub

Private Sub Cmdproses_Click()

rdhp.Text = Val(rdjj.Text) * Val(rdhs.Text)

If rdhp.Text > 30000000 Then

rddis.Text = Val(rdhp.Text) * 0.15

ElseIf rdhp.Text > 25000000 Then

rddis.Text = Val(rdhp.Text) * 0.1

ElseIf rdhp.Text > 20000000 Then

rddis.Text = Val(rdhp.Text) * 0.5

ElseIf rdhp.Text > 15000000 Then

rddis.Text = Val(rdhp.Text) * 0.2

End If

rdhb.Text = Val(rdhp.Text) – Val(rddis.Text)

End Sub

Private Sub Form_Load()

rdkk.AddItem “P205”

rdkk.AddItem “P308”

rdkk.AddItem “P310”

rdkk.AddItem “P415”

rdkk.AddItem “P417”

rdkk.AddItem “P419”

End Sub

SCREENSHOTS

TUGAS 6

TUGAS 7

Private Sub RBatal_Click()

RNIND.SetFocus

RNIND.Text = “”

RNAMA.Text = “”

RGOLONGAN.Text = “Pilih Golongan”

RGAJI = “”

RTUNJANGAN = “”

RPAJAK = “”

RTOTAL = “”

End Sub

 

Private Sub RKeluar_Click()

End

End Sub

 

Private Sub RLagi_Click()

RNIND.SetFocus

CRNIND.Text = “”

RNAMA.Text = “”

RGOLONGAN.Text = “Pilih Golongan”

RGAJI = “”

RTUNJANGAN = “”

RPAJAK = “”

RTOTAL = “”

End Sub

 

Private Sub Form_Load()

RGOLONGAN.AddItem “I”

RGOLONGAN.AddItem “II”

RGOLONGAN.AddItem “III”

RGOLONGAN.AddItem “IV”

End Sub

 

Private Sub RNama_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

RGOLONGAN.SetFocus

End If

End Sub

 

Private Sub RNIND_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

RNAMA.SetFocus

End If

End Sub

Private Sub RGolongan_Click()

Dim Golongan, GajiPokok, Tunjangan, Pajak, Total As Variant

 

Golongan = RGOLONGAN

Select Case Golongan

Case “I”

GajiPokok = 1500000

Tunjangan = 150000

Case “II”

GajiPokok = 2000000

Tunjangan = 200000

Case “III”

GajiPokok = 2500000

Tunjangan = 250000

Case “IV”

GajiPokok = 3000000

Tunjangan = 300000

End Select

RGAJI = GajiPokok

RTUNJANGAN = Tunjangan

 

Pajak = (GajiPokok + Tunjangan) * 0.1

RPAJAK = Pajak

 

Total = GajiPokok + Tunjangan – Pajak

RTOTAL = Total

End Sub

SCREENSHOTS

TUGAS 7

TUGAS 8

Private Sub cmdbatal_Click()

rdg.SetFocus

rdg.Text = “”

rdks.Text = “”

rds.Text = “”

rdt.Text = “”

rdj.Text = “”

rdb.Text = “”

rdgp.Text = “”

rdtun.Text = “”

rdtg.Text = “”

rdmnk.Text = “”

rdmn.Text = “”

End Sub

Private Sub cmdkeluar_Click()

End

End Sub

Private Sub cmdlagi_Click()

rdg.SetFocus

rdg.Text = “”

rdks.Text = “”

rds.Text = “”

rdt.Text = “”

rdj.Text = “”

rdb.Text = “”

rdgp.Text = “”

rdtun.Text = “”

rdtg.Text = “”

rdmnk.Text = “”

rdmn.Text = “”

End Sub

Private Sub cmdproses_Click()

Dim s As String

rdt.Text = Left(rdmn.Text, 4)

s = Mid(rdmn.Text, 5, 1)

If s = “A” Then

rdg.Text = “A”

rdj.Text = “Manager”

rdgp.Text = “4000000”

rdtun.Text = “1025000”

ElseIf s = “B” Then

rdg.Text = “B”

rdj.Text = “Ka.Seksi”

rdgp.Text = “3500000”

rdtun.Text = “975000”

ElseIf s = “C” Then

rdg.Text = “C”

rdj.Text = “Staf”

rdgp.Text = “3000000”

rdtun.Text = “925000”

End If

rdtg.Text = Val(rdgp) + Val(rdtun)

s = Mid(rdmn.Text, 7, 1)

If s = “S” Then

rds.Text = “singel”

rdks.Text = “S”

ElseIf s = “M” Then

rds.Text = “Menikah”

rdks.Text = “M”

ElseIf s = “J” Then

rds.Text = “Janda”

rdks.Text = “J”

ElseIf s = “D” Then

rds.Text = “Duda”

rdks.Text = “D”

End If

s = Mid(rdmn.Text, 9, 3)

If s = “KEU” Then

rdb.Text = “Accounting”

ElseIf s = “ADM” Then

rdb.Text = “Administrasi”

ElseIf s = “SDM” Then

rdb.Text = “General Affair”

ElseIf s = “EDP” Then

rdb.Text = “IT Unit”

ElseIf s = “SPM” Then

rdb.Text = “Security”

End If

End Sub

Private Sub Form_Activate()

rdmnk.SetFocus

End Sub

 

Private Sub rdmnk_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then

rdmn.SetFocus

End If

End Sub

SCREENSHOTS

TUGAS 8

 

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 )

Connecting to %s