Penerapan konsep oop Sisfo Penjualan Buku
Upcoming SlideShare
Loading in...5
×
 

Penerapan konsep oop Sisfo Penjualan Buku

on

  • 1,072 views

 

Statistics

Views

Total Views
1,072
Views on SlideShare
1,072
Embed Views
0

Actions

Likes
0
Downloads
23
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Penerapan konsep oop Sisfo Penjualan Buku Penerapan konsep oop Sisfo Penjualan Buku Presentation Transcript

  • PEMROGRAMAN VISUAL I 1
  • KELOMPOK - I Sri Widya Ningsi HT Ilham Eny Syamsuddin Kamaseni Mansyur M. 2
  • OOP dalam Sistem Penjualan Buku Target  Pembelian Object  Buku  Pelanggan Method  Beli 3
  • Gambaran Sistem Sistem Informasi Penjualan BukuObjek Pelanggan Objek Buku 4
  • Class Buku dan Turunannya cBuku Nama Class - BukuID - Judul - Pengarang Property Class Parent Class - Harga  Rak() Method / Event  Kategori() cBukuAnak cBukuDewasa Child Class Rak()  Rak() Kategori()  Kategori() 5
  • Class Pelanggan dan Turunannya cPelanggan Nama Class - NoId - Nama - LahirTmp Parent Class - LahirTgl Property Class - Alamat - NoTelp  TglDaftar()  Umur() Method / Event  Diskon() cPelangganVIP Child Class  Diskon()  TglExpire() 6
  • Class Beli dan Turunannya cBeli Nama Class - IdBeli - Nama - Umur Property Class Parent Class - JumBuku - TotHarga  TglBeli()  Jenis() Method / Event  Pajak() cBeliBiasa cBeliVIP Child Class Jenis()  Jenis() Pajak()  Pajak() 7
  • Listing Class cBukuPublic Class cBuku Public bukuID As String Public judul As String Public pengarang As String Public harga As Integer Public Overridable Function rak() As String Return "Rak-01" End Function Public Overridable Function kategori() As String Return "Reguler" End FunctionEnd Class 8
  • Listing Class cBukuAnakPublic Class cBukuAnak Inherits cBuku Public Sub New(ByVal cbukuId As String, ByVal cJudul As String, ByVal cPengarang As String, ByVal cHarga As Integer) MyBase.bukuID = cbukuId MyBase.judul = cJudul MyBase.pengarang = cPengarang MyBase.harga = cHarga End SubPublic Overloads Function rak() As String Return "Rak-02" End FunctionPublic Overloads Function kategori() As String Return "Anak" End FunctionEnd Class 9
  • Listing Class cBukuDewasaPublic Class cBukuDewasa Inherits cBuku Public Sub New(ByVal cbukuId As String, ByVal cJudul As String, ByVal cPengarang As String, ByVal cHarga As Integer) MyBase.bukuID = cbukuId MyBase.judul = cJudul MyBase.pengarang = cPengarang MyBase.harga = cHarga End Sub Public Overloads Function rak() As String Return "Rak-xXx" End Function Public Overloads Function kategori() As String Return "Dewasa" End FunctionEnd Class 10
  • Listing Class cPelangganPublic MustInherit Class cPelanggan Public noid As String Public nama As String Public lahirtmp As String Public lahirTgl As Date Public alamat As String Public noTelp As String Protected Friend Function tgldaftar() As Date Return Now() End Function Protected Friend Function umur() As Integer Dim vUmur As Integer vUmur = Year(Now()) - Year(lahirTgl) Return vUmur End Function Protected Friend MustOverride Function diskon() As IntegerEnd Class 11
  • Listing Class cPelangganVIPPublic Class cPelangganVIP Inherits cPelanggan Public Sub New(ByVal cNoId As String, ByVal cNama As String, ByVal cLahirTmp As String, ByVal cLahirTgl As Date, ByVal cAlamat As String, ByVal cnoTelp As String) MyBase.noid = cNoId MyBase.nama = cNama MyBase.lahirtmp = cLahirTmp MyBase.lahirTgl = cLahirTgl MyBase.alamat = cAlamat MyBase.noTelp = cnoTelp End Sub Protected Friend Overrides Function diskon() As Integer Return 10 End Function Protected Friend Function tglExpire() As Date Dim expire As Date expire = DateSerial(Year(MyBase.tgldaftar()) + 2, Month(MyBase.tgldaftar()) + 1, 1) Return expire End FunctionEnd Class 12
  • Listing Class cBeliPublic MustInherit Class cBeli Public idBeli As String Public nama As String Public umur As Integer Public jumBuku As Integer Public totHarga As Single Protected Friend Function tglbeli() As Date Return Now() End Function Protected Friend MustOverride Function jenis() As String Protected Friend MustOverride Function pajak() As SingleEnd Class 13
  • Listing Class cBeliBiasaPublic Class cBeliBiasa Inherits cBeli Public Sub New(ByVal cIdBeli As String, ByVal cNama As String, ByVal cUmur As Integer, ByVal cJumbuku As Integer, ByVal ctotHarga As Single) MyBase.idBeli = cIdBeli MyBase.nama = cNama MyBase.umur = cUmur MyBase.jumBuku = cJumbuku MyBase.totHarga = ctotHarga End SubProtected Friend Overrides Function jenis() As String Return "Pembeli Biasa" End FunctionProtected Friend Overrides Function pajak() As Single Return (10 / 100) * MyBase.totHarga End FunctionEnd Class 14
  • Listing Class cBeliVIPPublic Class cBeliVIP Inherits cBeli Public Sub New(ByVal cIdBeli As String, ByVal cNama As String, ByVal cUmur As Integer, ByVal cJumbuku As Integer, ByVal ctotHarga As Single) MyBase.idBeli = cIdBeli MyBase.nama = cNama MyBase.umur = cUmur MyBase.jumBuku = cJumbuku MyBase.totHarga = ctotHarga End SubProtected Friend Overrides Function jenis() As String Return "Pembeli VIP" End FunctionProtected Friend Overrides Function pajak() As Single Return (5 / 100) * MyBase.totHarga End FunctionEnd Class 15
  • Contoh Listing Pembuatan Objekkelas = New cBuku kelas.bukuID = txtIdbuku.Text kelas.judul = txtJudul.Text kelas.pengarang = txtPengarang.Text kelas = New cBukuDewasa kelas.harga = Val(txtHarga.Text) kelas.bukuID = txtIdbuku.Text kelas.judul = txtJudul.Textkelas = New cBukuAnak kelas.pengarang = txtPengarang.Text kelas.bukuID = txtIdbuku.Text kelas.harga = Val(txtHarga.Text) kelas.judul = txtJudul.Text kelas.pengarang = txtPengarang.Text kelas = New cPelangganVIP kelas.harga = Val(txtHarga.Text) kelas.noid = txtIdpelanggan.Text kelas.nama = txtNamaPelanggan.Text kelas.lahirtmp = txtLahirTmp.Text kelas.lahirTgl = dtLahirTgl.Value kelas.alamat = txtAlamat.Text kelas.noTelp = txtNoTelp.Text 16
  • Tampilan Program 17
  • Menu Administrasi Buku 18
  • Menu Administrasi Pelanggan 19
  • Menu Transaksi Pembelian 20