Contoh Kasus - PowerPoint PPT Presentation

1 / 27
About This Presentation
Title:

Contoh Kasus

Description:

The struct StoreTotals and this readonly attribute are used // in place of a pair of float attributes to avoid data inconsistencies ... – PowerPoint PPT presentation

Number of Views:3921
Avg rating:3.0/5.0
Slides: 28
Provided by: bettypur
Category:

less

Transcript and Presenter's Notes

Title: Contoh Kasus


1
Contoh Kasus
  • IndoMart, adl sebuah jaringan mini market yg
    menggunakan Point-Of-Sale (POS) terminal sbg cash
    register, dgn fasilitas barcode reader receipt
    printer.
  • Masing-masing store (toko), memiliki sebuah
    komputer yg terhubung ke seluruh POS yg ada di
    store tsb. Pd komputer tsb tercatat markup, tax
    policy, store totals.

2
Contoh Kasus
  • Seluruh komputer Store terhubung ke komputer
    Depot yg ada di kantor pusat. Komputer Depot
    memberikan informasi kpd komputer Store, spt
    harga dasar (sebelum markup), informasi
    deskriptif utk dicetak pd slip penjualan.
    Komputer Depot memantau inventori masing-masing
    toko, menjadualkan pengiriman stok sesuai
    status inventori tsb.

3
Contoh Kasus
4
USE CASES
  • Dalam OOAD, use cases digunakan utk menentukan
    apakah desain sistem sudah lengkap atau belum.
  • Use case mendefinisikan business rule
  • What will happen in the business.
  • Di sini hanya akan ditampilkan use case singkat.
    Dalam tugas maupun ujian, gunakan use case
    lengkap, mengacu pd referensi OOAD.

5
USE CASES
  • Initialization
  • Nyalakan POS station.
  • Nyalakan komputer Store.
  • Nyalakan komputer Depot.
  • Masing-masing akan memulai obyek ygbersesuaian,
    dan memanggil operasi inisialisasi.

6
USE CASES
  • Login-to-POS
  • Seorang kasir datang ke sebuah POS station yg
    telah menyala, kemudian mengetikkan L pd keypad.
  • Keypad memanggil operasi login dr POS station
    tersebut.

7
USE CASES
  • Request-a-report (ada 2 jenis)
  • Seseorang mengetikkan P atau S pd keypad.
  • Keypad memanggil operasi print_POS_sales_summary
    atau print_store_sales_summary pd POS station
    tersebut.

8
USE CASES
  • Perform-a-sale
  • (Optional) Operator mengetikkan Qn pd keypad, utk
    menyatakan pembelian multiple item pd pembacaan
    barcode berikutnya.Keypad memanggil operasi
    item_quantity pd obyek POSTerminal, yg memiliki n
    sbg input argumen.

9
USE CASES
  • Operator memindai (scan) barang yg dibeli.
    Scanner memanggil operasi send_barcode pd obyek
    POSTerminal dgn no barcode sbg input argumen. Ada
    2 kemungkinan
  • Barcode tidak dikenal hasil scan diabaikan,
    kasir mencoba lagi. Asumsi akhirnya akan
    berhasil.
  • Barcode dikenal. Lakukan kalkulasi, cetak
    penjualan di kertas. Sebelum pencetakan baris
    pertama, cetak dahulu nama toko.

10
USE CASES
  1. Ulangi langkah 1 2, sampai kasir mengetikkan T
    pd keypad. Jika hal tsb terjadi, keypad memanggil
    operasi end_sale pd obyek POSTerminal, tanpa
    argumen. Lakukan update yg diperlukan, cetak
    baris lain pada slip pembelanjaan termasuk sub
    total, pajak, grand total.

11
Catatan
  • Setiap baris penjualan pd slip berisi

Barcode No Nama Item Harga Jual Satuan Jumlah Penjualan Total Harga Jual
Dihitung oleh POS station harga satuan sesudah
markup x jumlah penjualan
Dari barcode reader pd POS station
Dari komputer Depot
Dimasukkan oleh kasir melalui keypad
Harga dasar dari komputer DepotPersentase markup
disimpan di komputer StoreHarga jual (sesudah
markup) dihitung di komputer Store
12
Catatan
  • Agar dpt mencetak setiap baris penjualan pd sales
    slip melaporkan inventori toko pd komputer
    Depot
  • Setiap POS station mengirimkan no barcode
    jumlah penjualan suatu item ke komputer Store.
  • Komputer Store menyampaikan informasi tsb ke
    komputer Depot, yg menjawab dgn informasi harga
    dasar item tsb, jenis pajak, dan nama item.

13
Catatan
  • Komputer Store menghitung harga sesudah mark up.
    Suatu item dpt dijual dgn harga berbeda di
    toko-toko yg berada pd jaringan IndoMart.
  • Harga sesudah markup dikirimkam dr komputer Store
    ke POS station.
  • POS station mencetak nama item harga satuan
    item tsb pd slip penjualan.
  • Komputer Store juga mengirimkan kpd POS station,
    harga sesudah pajak dr item tsb.

14
Catatan
  • POS station menghitung dan mencetak harga
    penjualan sesuai jumlah yg dijual utk item tsb
    harga satuan sesudah markup x quantity (jumlah
    penjualan).
  • Komputer Store mencatat total penjualan dalam
    satu hari, yg dpt dihitung melalui pemanggilan
    operasi print_store_sales_summary. Operasi tsb
    dpt dipanggil dr setiap POS station, tidak ada
    console khusus utk komputer Store.

15
Catatan
  • Pajak dihitung oleh komputer Store sbg final
    taxable sales total, tidak dihitung per-item, utk
    menghindari kesalahan kumulatif dlm pembulatan.

16
Objects
  • InputMedia
  • OutputMedia
  • POSTerminal
  • Ketiganya ada pd POS station, yg terhubung dlm
    LAN setiap toko.
  1. Store
  2. StoreAccess
  3. TaxKetiganya ada pd komputer Store, satu LAN dgn
    POS di toko tsb.
  4. DepotAda pd WAN IndoMart
  • Masing-masing obyek memiliki
  • Glossary (keterangan)
  • State variables
  • Operations

17
Obyek pd POS Station
  • InputMedia
  • Mensimulasikan keypad barcode reader devices.
  • OutputMedia
  • Mensimulasikan sales printer screen, yg
    menunjukkan status penjualan saat ini.
  • POSTerminal
  • Menangani interaksi antara media devices,
    mengingat status kalkulasi penjualan yg sedang
    berjalan, menyediakan fasilitas log in bagi
    kasir, menyampaikan laporan ttg POS station atau
    komputer Store.

18
Obyek pd Komputer Store
  • Store
  • Traffic keeper accountant for the store.
  • Menangani seluruh POS station pd suatu toko,
    mengatur log in POS station tsb, mencatat
    melaporkan seluruh pd penjualan komputer Store
    POS station.
  • StoreAccess
  • Menangani sebuah POS station, agar obyek Store
    tdk overloaded.
  • Menyediakan akses ke basis data inventori.

19
Obyek pd Komputer Store
  • Tax
  • Menyimpan informasi status pajak setiap item yg
    dijual di suatu toko.
  • Pd contoh ini, pakaian makanan tidak dikenai
    pajak. Barang lainnya dikenakan flat tax
    (straight percentage of sales price).

20
Obyek pd Komputer Depot
  • Depot
  • Merepresentasikan inventori jaringan IndoMart,
    berisikan informasi seluruh item yg dijual di
    seluruh toko.

21
IDL Module POS
  • module POS
  • typedef long POSId
  • typedef string Barcode
  • interface InputMedia
  • typedef string OperatorCmd
  • void barcode_input(in Barcode
    item)
  • void keypad_input( in OperatorCmd
    cmd)
  • interface OutputMedia
  • boolean output_text( in string
    string_to_print )

22
IDL Module POS
  • interface POSTerminal
  • void login()
  • void print_POS_sales_summary()
  • void print_store_sales_summary()
  • void send_barcode(in Barcode item)
  • void item_quantity(in long
    quantity)
  • void end_of_sale()

23
IDL Module AStore
  • module AStore
  • enum ItemTypes FOOD, CLOTHES, OTHER
  • typedef long AStoreId
  • struct ItemInfo
  • POSBarcode item
  • ItemTypes item_type
  • float item_cost
  • string name
  • long quantity
  • // The barcodeNotFound exception indicates
    that the
  • // input barcode does not match to any known
    item.
  • exception BarcodeNotFound POSBarcode
    item

24
IDL Module AStore
  • interface StoreAccess // /forward reference
  • struct POSInfo
  • POSPOSId id
  • StoreAccess store_access_reference
  • float total_sales
  • float total_taxes
  • typedef sequence ltPOSInfogt POSList
  • interface Tax
  • float calculate_tax( in float
    taxable_amount)
  • float find_taxable_price(in float
    item_price,
  • in ItemTypes
    item_type)

25
IDL Module AStore
  • interface Store
  • struct StoreTotals
  • float store_total
  • float store_tax_total
  • readonly attribute AStoreId store_id
  • // The struct StoreTotals and this
    readonly attribute are used
  • // in place of a pair of float attributes
    to avoid data inconsistencies
  • // that would result from the following
    sequence of operations
  • //
  • // POS 1 invokes a method to read
    store_total
  • // POS 2 invokes the method
    update_store_totals
  • // POS 1 invokes a method to read the
    store_tax_total
  • readonly attribute StoreTotals totals

26
IDL Module AStore
  • interface StoreAccess
  • // ItemTaxPrice is 0 or return value of
    FindTaxablePrice()
  • void find_price(in POSBarcode item,
  • in long
    quantity,
  • out float
    item_price,
  • out float
    item_tax_price,
  • out ItemInfo
    item_info)
  • raises (BarcodeNotFound)

27
IDL Module CentralOffice
  • module CentralOffice
  • interface Depot
  • void find_item_info(
  • in AStoreAStoreId
    store_id,
  • in POSBarcode item,
  • in long
    quantity,
  • out AStoreItemInfo
    item_info)
  • raises (AStoreBarcodeNotFound)
Write a Comment
User Comments (0)
About PowerShow.com