Selasa, 12 Desember 2017

Tugas 3.7 PT. PULANG PETANG SETIAP HARI


Private Sub cmdbatal_Click()
txtnama.Text = ""
txtnik.Text = ""
Txtgol.Text = ""
txtkode.Text = ""
txtstatus.Text = ""
txttahun.Text = ""
txtjabatan.Text = ""
txtbagian.Text = ""
txtgaji.Text = ""
txttj.Text = ""
txttotal.Text = ""
txtnama.SetFocus
End Sub

Private Sub cmdkeluar_Click()
End
End Sub

Private Sub cmdlagi_Click()
txtnama.Text = ""
txtnik.Text = ""
Txtgol.Text = ""
txtkode.Text = ""
txtstatus.Text = ""
txttahun.Text = ""
txtjabatan.Text = ""
txtbagian.Text = ""
txtgaji.Text = ""
txttj.Text = ""
txttotal.Text = ""
txtnama.SetFocus
End Sub

Private Sub cmdproses_Click()
Dim S As String
txttahun.Text = Left(txtnik.Text, 4)
S = Mid(txtnik.Text, 5, 1)
If S = "A" Then
Txtgol.Text = "A"
txtjabatan.Text = "Manajemen"
txtgaji.Text = "4000000"
txttj.Text = "1025000"
ElseIf S = "B" Then
Txtgol.Text = "B"
txtjabatan.Text = "Ka. Seksi"
txtgaji.Text = "3500000"
txttj.Text = "975000"
ElseIf S = "C" Then
Txtgol.Text = "C"
txtjabatan.Text = "Staff"
txtgaji.Text = "3000000"
txttj.Text = "925000"
End If
S = Mid(txtnik.Text, 7, 1)
If S = "S" Then
txtkode.Text = "S"
txtstatus.Text = "Single"
ElseIf S = "M" Then
txtkode.Text = "M"
txtstatus.Text = "Menikah"
ElseIf S = "J" Then
txtkode.Text = "J"
txtstatus.Text = "Janda"
ElseIf S = "D" Then
txtkode.Text = "D"
txtstatus.Text = "Duda"
End If
S = Right(txtnik.Text, 3)
If S = "KEU" Then
txtbagian.Text = "Accounting"
ElseIf S = "ADM" Then
txtbagian.Text = "Administrasi"
ElseIf S = "SDM" Then
txtbagian.Text = "General Affair"
ElseIf S = "EDP" Then
txtbagian.Text = "IT Unit"
ElseIf S = "SPM" Then
txtbagian.Text = "Security"
End If
txttotal.Text = Val(txtgaji.Text) + Val(txttj.Text)
End Sub

Tugas 3.6 DATA BUKU STMIK PRINGSEWU


Private Sub cmdbatal_Click()
Txtkode.Text = ""
txtjudul.Text = ""
txtpengarang.Text = ""
txttahun.Text = ""
txtpenerbit.Text = ""
txtharga.Text = ""
Txtkode.SetFocus
End Sub

Private Sub cmdkeluar_Click()
End
End Sub

Private Sub cmdlagi_Click()
Txtkode.Text = ""
txtjudul.Text = ""
txtpengarang.Text = ""
txttahun.Text = ""
txtpenerbit.Text = ""
txtharga.Text = ""
Txtkode.SetFocus
End Sub

Private Sub cmdproses_Click()
Dim A As String
A = Left(Txtkode.Text, 3)
If A = "SIM" Then
txtjudul.Text = "Sistem Informasi"
txtpengarang.Text = "Fadiya Ulfa"
txtharga.Text = "75900"
ElseIf A = "EDP" Then
txtjudul.Text = "Elektronik Data Processing"
txtpengarang.Text = "Nurul Agustina"
txtharga.Text = "62000"
ElseIf A = "MNJ" Then
txtjudul.Text = "Manajemen"
txtpengarang.Text = "Riyan Hidayat"
txtharga.Text = "42000"
ElseIf A = "CDR" Then
txtjudul.Text = "Corel draw"
txtpengarang.Text = "Siti Nur Khotimah"
txtharga.Text = "53000"
ElseIf A = "RPL" Then
txtjudul.Text = "Rekayasa Perangkat Lunak"
txtpengarang.Text = "Winda Erlianti"
txtharga.Text = "83000"
End If
txttahun.Text = "20" & Mid(Txtkode.Text, 5, 2)
A = Right(Txtkode.Text, 1)
If A = "A" Then
txtpenerbit.Text = "Andi Offset Yogyakarta"
ElseIf A = "I" Then
txtpenerbit.Text = "Indah Surabaya"
ElseIf A = "S" Then
txtpenerbit.Text = "Salemba Empat"
ElseIf A = "E" Then
txtpenerbit.Text = "Elek Media Komputindo"
ElseIf A = "M" Then
txtpenerbit.Text = "Maxicom"
End If
End Sub

Tugas 3.5 Penjualan Tiket Kereta Api


Private Sub cmdlagi_Click()
Txtkode.Text = ""
txtharga.Text = ""
txtjenis.Text = ""
txtjam.Text = ""
txtjumlah.Text = ""
txttotal.Text = ""
Txtkode.SetFocus
End Sub

Private Sub cmdout_Click()
End
End Sub

Private Sub cmdproses_Click()
Dim B As String

B = Left(Txtkode.Text, 3)
If B = "BIM" Then
txtharga.Text = "50000"
txtjenis.Text = "BIMA"
txtjam.Text = "16.00"
ElseIf B = "EKO" Then
txtharga.Text = "35000"
txtjenis.Text = "EKONOMI"
txtjam.Text = "19.00"
ElseIf B = "MUT" Then
txtharga.Text = "23000"
txtjenis.Text = "MUTIARA"
txtjam.Text = "17.00"
ElseIf B = "SEN" Then
txtharga.Text = "15000"
txtjenis.Text = "SENJA"
txtjam.Text = "20.00"
End If
txtjumlah.SetFocus
End Sub

Private Sub txtjumlah_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txttotal.Text = Val(txtharga.Text) * Val(txtjumlah.Text)
End If
End Sub

Tugas 3.4 Data Buku STMIK PRINGSEWU


Private Sub cbokodebuku_Click()
Select Case cbokodebuku.Text
Case "A-SIM-01"
Case "I-EDP-02"
Case "S-MNJ-03"
Case "E-CDR-04"
Case "M-RPL-05"
End Select
End Sub

Private Sub cmdbatal_Click()
cbokodebuku.SetFocus
cbokodebuku.Text = ""
Txtjb.Text = ""
txtpeng.Text = ""
txttater.Text = ""
txtpen.Text = ""
txtharga.Text = ""
End Sub

Private Sub cmdkeluar_Click()
End
End Sub

Private Sub cmdlagi_Click()
cbokodebuku.SetFocus
cbokodebuku.Text = ""
Txtjb.Text = ""
txtpeng.Text = ""
txttater.Text = ""
txtpen.Text = ""
txtharga.Text = ""
End Sub

Private Sub cmdproses_Click()
Dim A As String
A = Left(cbokodebuku, 1)
If A = "A" Then
txtpen.Text = "ANDI OFFSET YOGYAKARTA"
ElseIf A = "I" Then
txtpen.Text = "INDAH SURABAYA"
ElseIf A = "S" Then
txtpen.Text = "SALEMBA EMPAT"
ElseIf A = "E" Then
txtpen.Text = "ELEK MEDIA KOMPUTINDO"
ElseIf A = "M" Then
txtpen.Text = "MAXICOM"
End If
A = Mid(cbokodebuku, 3, 3)
If A = "SIM" Then
Txtjb.Text = "Sistem Informasi Menejemen"
txtpeng.Text = "YATI NUR OKTAVIA"
txtharga.Text = "75900"
ElseIf A = "EDP" Then
Txtjb.Text = "Elektronik Data Prosesing"
txtpeng.Text = "IMAM TARMIZI"
txtharga.Text = "62000"
ElseIf A = "MNJ" Then
Txtjb = "Menejemen"
txtpeng.Text = "VALENTINA MARIANA ADIWIANTI"
txtharga.Text = "42000"
ElseIf A = "CDR" Then
Txtjb.Text = "corel draw"
txtpeng.Text = "RIYAN SUHANDI"
txtharga.Text = "53000"
ElseIf A = "RPL" Then
Txtjb.Text = "Rekayasa Perangkat Lunak"
txtpeng.Text = "SINTA UMPU SINGA"
txtharga.Text = "83000"
End If
txttater.Text = "20" & Right(cbokodebuku, 2)
End Sub

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


TUGAS 3.3 Entri Penjualan Laptop Apple



Private Sub cbokode_Click()
Dim Penjualan, discount, kode, merk, bayar As String
Dim Harga As Variant

merk = Mid(cbokode.Text, 7, 5)
If merk = "MC965" Then
txtmerk.Text = "Apple MacBook Air MC965"
Harga = "12800000"
ElseIf kode = "MC966" Then
txtmerk.Text = "Apple MacBook Air MC966"
Harga = "15800000"
ElseIf merk = "MC968" Then
txtmerk.Text = "Apple MacBook Air MC968"
Harga = "9900000"
ElseIf merk = "MC969" Then
txtmerk.Text = "Apple MacBook Air MC969"
Harga = "11900000"
ElseIf merk = "MC700" Then
txtmerk.Text = "Apple MacBook Air MC700"
Harga = "10800000"
ElseIf merk = "MC721" Then
txtmerk.Text = "Apple MacBook Air MC721"
Harga = "15900000"
ElseIf merk = "MC723" Then
txtmerk.Text = "Apple MacBook Air MC723"
Harga = "19300000"
ElseIf merk = "MC724" Then
txtmerk.Text = "Apple MacBook Air MC724"
Harga = "13700000"
ElseIf merk = "MC311" Then
txtmerk.Text = "Apple MacBook Air MC311"
Harga = "24200000"
ElseIf merk = "MC313" Then
txtmerk.Text = "Apple MacBook Air MC313"
Harga = "11900000"
ElseIf merk = "MC314" Then
txtmerk.Text = "Apple MacBook Air MC314"
Harga = "14700000"
ElseIf merk = "MC318" Then
txtmerk.Text = "Apple MacBook Air MC318"
Harga = "17600000"
ElseIf merk = "MC322" Then
txtmerk.Text = "Apple MacBook Air MC322"
Harga = "21300000"
ElseIf merk = "MC965" Then
txtmerk.Text = "Apple MacBook Air MC965"
Harga = "12800000"
ElseIf merk = "MC966" Then
txtmerk.Text = "Apple MacBook Air MC966"
Harga = "15800000"
End If
txtmerk.Text = merk
txths.Text = Harga
Txtjuju.SetFocus
End Sub

Private Sub cmdhitung_Click()
cbokode.SetFocus
cbokode.Text = ""
txtmerk.Text = ""
txths.Text = ""
Txtjuju.Text = ""
txthp.Text = ""
txtdis.Text = ""
txttoba.Text = ""
End Sub

Private Sub cmdkeluar_Click()
Unload Me
End Sub

Private Sub cmdproses_Click()
txthp.Text = Val(Txtjuju.Text) * Val(txths.Text)
If txthp.Text > 140000000 Then
txtdis.Text = 0.15 * txthp.Text
ElseIf txthp.Text > 135000000 Then
txtdis.Text = 0.1 * txthp.Text
ElseIf txthp.Text > 130000000 Then
txtdis.Text = 0.05 * txthp.Text
ElseIf txthp.Text > 125000000 Then
txtdis.Text = 0.02 * txthp.Text
Else
txtdis.Text = 0
End If
txttoba.Text = Val(txthp.Text) - Val(txtdis.Text)
End Sub

Private Sub Form_Load()
cbokode.AddItem "Apple MC965 MasBook Air"
cbokode.AddItem "Apple MC966 MasBook Air"
cbokode.AddItem "Apple MC968 MasBook Air"
cbokode.AddItem "Apple MC969 MasBook Air"
cbokode.AddItem "Apple MC700 MasBook Pro"
cbokode.AddItem "Apple MC721 MasBook Pro"
cbokode.AddItem "Apple MC723 MasBook Pro"
cbokode.AddItem "Apple MC724 MasBook Pro"
cbokode.AddItem "Apple MC311 MasBook Pro"
cbokode.AddItem "Apple MC313 MasBook Pro"
cbokode.AddItem "Apple MC314 MasBook Pro"
cbokode.AddItem "Apple MC318 MasBook Pro"
cbokode.AddItem "Apple MC322 MasBook Pro"
cbokode.AddItem "Apple MC965 MasBook Air"
cbokode.AddItem "Apple MC966 MasBook Air"
End Sub

Tugas 3.1


Private Sub cbogol_Click()
Dim gapok, pajak, tunjangan, total As Variant
Select Case cbogol.Text
Case "I"
gapok = 1500000
tunjangan = 150000
Case "II"
gapok = 2000000
tunjangan = 200000
Case "III"
gapok = 2500000
tunjangan = 250000
Case "IV"
gapok = 3000000
tunjangan = 300000
Case Else
gapok = 0
tunjangan = 0
End Select
total = gapok + tunjangan
pajak = total * 0.1
txtgp.Text = gapok
txttj.Text = tunjangan
txtpj = pajak
txttt.Text = total - pajak
End Sub

Private Sub cmdbatal_Click()
kosong
End Sub

Private Sub cmdkeluar_Click()
Unload Me
End Sub

Private Sub cmdlagi_Click()
kosong
End Sub

Private Sub Form_Load()
cbogol.AddItem "I"
cbogol.AddItem "II"
cbogol.AddItem "III"
cbogol.AddItem "IV"
End Sub
Public Sub kosong()
Txtnidn.SetFocus
Txtnidn = ""
txtnp = ""
cbogol = ""
txtgp = ""
txttj = ""
txtpj = ""
txttt = ""
End Sub

Private Sub Txtnidn_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtnp.SetFocus
End If
End Sub

Senin, 11 Desember 2017

TUGAS 3.2



Private Sub cmdbatal_Click()
Txtnama.SetFocus
Txtnama = ""
txtnpm = ""
txtjurusan = ""
txtprodi = ""
txttm = ""
txtnorut = ""
End Sub

Private Sub cmdkeluar_Click()
Unload Me
End Sub

Private Sub cmdlagi_Click()
Txtnama.SetFocus
Txtnama = ""
txtnpm = ""
txtjurusan = ""
txtprodi = ""
txttm = ""
txtnorut = ""
End Sub

Private Sub cmdproses_Click()
Dim s As String
txttm.Text = "20" & Left(txtnpm.Text, 2)
s = Mid(txtnpm.Text, 3, 1)
If s = "1" Then
txtjurusan.Text = "Sistem Informasi"
ElseIf s = "2" Then
txtjurusan.Text = "Menejemen Informasi "
ElseIf s = "3" Then
txtjurusan.Text = "Tehnik Komputer"
ElseIf s = "4" Then
txtjurusan.Text = "Menejemen & Komp. Akuntansi"
End If
s = Mid(txtnpm.Text, 4, 2)
If s = "01" Then
txtprodi.Text = "strata satu"
ElseIf s = "02" Then
txtprodi.Text = "Diploma Tiga"
ElseIf s = "03" Then
txtprodi.Text = "Diploma Empat"
ElseIf s = "04" Then
txtprodi.Text = "Diploma Dua"
End If
txtnorut.Text = Right(txtnpm.Text, 3)
End Sub

Private Sub form_activate()
Txtnama.SetFocus
Txtnama = ""
txtnpm = ""
txtjurusan = ""
txtprodi = ""
txttm = ""
txtnorut = ""
End Sub

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

End Sub

GRAFIK 3 DIMENSI PADA MATLAB

M enggunakan fungsi-fungsi built-in pada MATLAB. Ada 3 macam fungsi MATLAB yang sering digunakan untuk menggabar grafik tiga dimensi in...