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               ...
Gambaran Sistem                  Sistem Informasi                   Penjualan BukuObjek Pelanggan                      Obj...
Class Buku dan Turunannya                    cBuku             Nama Class               -   BukuID               -   Judul...
Class Pelanggan dan Turunannya     cPelanggan     Nama Class -   NoId -   Nama -   LahirTmp                        Parent ...
Class Beli dan Turunannya                    cBeli           Nama Class              -   IdBeli              -   Nama     ...
Listing Class cBukuPublic Class cBuku  Public bukuID As String  Public judul As String  Public pengarang As String  Public...
Listing Class cBukuAnakPublic Class cBukuAnak  Inherits cBuku  Public Sub New(ByVal cbukuId As String, ByVal cJudul As Str...
Listing Class cBukuDewasaPublic Class cBukuDewasa  Inherits cBuku  Public Sub New(ByVal cbukuId As String, ByVal cJudul As...
Listing Class cPelangganPublic MustInherit Class cPelanggan  Public noid As String  Public nama As String  Public lahirtmp...
Listing Class cPelangganVIPPublic Class cPelangganVIP  Inherits cPelanggan  Public Sub New(ByVal cNoId As String, ByVal cN...
Listing Class cBeliPublic MustInherit Class cBeli  Public idBeli As String  Public nama As String  Public umur As Integer ...
Listing Class cBeliBiasaPublic Class cBeliBiasa  Inherits cBeli  Public Sub New(ByVal cIdBeli As String, ByVal cNama As St...
Listing Class cBeliVIPPublic Class cBeliVIP  Inherits cBeli  Public Sub New(ByVal cIdBeli As String, ByVal cNama As String...
Contoh Listing Pembuatan Objekkelas = New cBuku    kelas.bukuID = txtIdbuku.Text    kelas.judul = txtJudul.Text    kelas.p...
Tampilan Program                   17
Menu Administrasi Buku                         18
Menu Administrasi Pelanggan                              19
Menu Transaksi Pembelian                           20
Penerapan konsep oop Sisfo Penjualan Buku
Upcoming SlideShare
Loading in …5
×

Penerapan konsep oop Sisfo Penjualan Buku

1,243 views
1,091 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,243
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
48
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Penerapan konsep oop Sisfo Penjualan Buku

  1. 1. PEMROGRAMAN VISUAL I 1
  2. 2. KELOMPOK - I Sri Widya Ningsi HT Ilham Eny Syamsuddin Kamaseni Mansyur M. 2
  3. 3. OOP dalam Sistem Penjualan Buku Target  Pembelian Object  Buku  Pelanggan Method  Beli 3
  4. 4. Gambaran Sistem Sistem Informasi Penjualan BukuObjek Pelanggan Objek Buku 4
  5. 5. 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
  6. 6. 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
  7. 7. 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
  8. 8. 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
  9. 9. 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
  10. 10. 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
  11. 11. 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
  12. 12. 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
  13. 13. 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
  14. 14. 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
  15. 15. 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
  16. 16. 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
  17. 17. Tampilan Program 17
  18. 18. Menu Administrasi Buku 18
  19. 19. Menu Administrasi Pelanggan 19
  20. 20. Menu Transaksi Pembelian 20

×