contoh kasus

27
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.

Upload: miya

Post on 06-Jan-2016

109 views

Category:

Documents


2 download

DESCRIPTION

Contoh Kasus. IndoMart, adl sebuah jaringan mini market yg menggunakan Point-Of-Sale (POS) terminal sbg cash register, dgn fasilitas barcode reader & receipt printer. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: 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.

Page 2: Contoh Kasus

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.

Page 3: Contoh Kasus

3

Contoh Kasus

DEPOT

STORE STORE

POS POS POS POS

Page 4: Contoh Kasus

4

USE CASES

Dalam OOA&D, 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 OOA&D.

Page 5: Contoh Kasus

5

USE CASES

1. Initialization:1. Nyalakan POS station.

2. Nyalakan komputer Store.

3. Nyalakan komputer Depot.

Masing-masing akan memulai obyek ygbersesuaian, dan memanggil operasi inisialisasi.

Page 6: Contoh Kasus

6

USE CASES

2. Login-to-POS:1. Seorang kasir datang ke sebuah POS station

yg telah menyala, kemudian mengetikkan L pd keypad.

2. Keypad memanggil operasi login dr POS station tersebut.

Page 7: Contoh Kasus

7

USE CASES

3. Request-a-report (ada 2 jenis):1. Seseorang mengetikkan P atau S pd keypad.

2. Keypad memanggil operasi print_POS_sales_summary atau print_store_sales_summary pd POS station tersebut.

Page 8: Contoh Kasus

8

USE CASES

4. Perform-a-sale1. (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.

Page 9: Contoh Kasus

9

USE CASES

2. Operator memindai (scan) barang yg dibeli. Scanner memanggil operasi send_barcode pd obyek POSTerminal dgn no barcode sbg input argumen. Ada 2 kemungkinan:

a) Barcode tidak dikenal – hasil scan diabaikan, kasir mencoba lagi. Asumsi: akhirnya akan berhasil.

b) Barcode dikenal. Lakukan kalkulasi, cetak penjualan di kertas. Sebelum pencetakan baris pertama, cetak dahulu nama toko.

Page 10: Contoh Kasus

10

USE CASES

3. 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.

Page 11: Contoh Kasus

11

Catatan

Setiap baris penjualan pd slip berisi:

Barcode No

Nama Item Harga Jual Satuan

Jumlah Penjualan

Total Harga Jual

Dari barcode reader pd POS station

Dari komputer Depot

Harga dasar dari komputer DepotPersentase markup disimpan di komputer StoreHarga jual (sesudah markup) dihitung di komputer Store

Dimasukkan oleh kasir melalui keypad

Dihitung oleh POS station harga satuan sesudah markup x jumlah penjualan

Page 12: Contoh Kasus

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.

Page 13: Contoh Kasus

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.

Page 14: Contoh Kasus

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.

Page 15: Contoh Kasus

15

Catatan

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

Page 16: Contoh Kasus

16

Objects

1. InputMedia

2. OutputMedia

3. POSTerminal

Ketiganya ada pd POS station, yg terhubung dlm LAN setiap toko.

4. Store5. StoreAccess6. Tax

Ketiganya ada pd komputer Store, satu LAN dgn POS di toko tsb.

7. DepotAda pd WAN IndoMart

Masing-masing obyek memiliki:•Glossary (keterangan)•State variables•Operations

Page 17: Contoh Kasus

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.

Page 18: Contoh Kasus

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.

Page 19: Contoh Kasus

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).

Page 20: Contoh Kasus

20

Obyek pd Komputer Depot

Depot:– Merepresentasikan inventori jaringan

IndoMart, berisikan informasi seluruh item yg dijual di seluruh toko.

Page 21: Contoh Kasus

21

IDL Module POSmodule 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 ); };

Page 22: Contoh Kasus

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();

};

};

Page 23: Contoh Kasus

23

IDL Module AStoremodule AStore{ enum ItemTypes {FOOD, CLOTHES, OTHER}; typedef long AStoreId;

struct ItemInfo { POS::Barcode 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 { POS::Barcode item; };

Page 24: Contoh Kasus

24

IDL Module AStore

interface StoreAccess; // /forward reference

struct POSInfo { POS::POSId id; StoreAccess store_access_reference; float total_sales; float total_taxes; };

typedef sequence <POSInfo> POSList;

interface Tax { float calculate_tax( in float taxable_amount); float find_taxable_price(in float item_price, in ItemTypes item_type); };

Page 25: Contoh Kasus

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;

StoreAccess login( in POS::POSId id); void get_POS_totals( out POSList POS_data); void update_store_totals( in POS::POSId id, in float price, in float taxes); };

Page 26: Contoh Kasus

26

IDL Module AStore

interface StoreAccess

{

// ItemTaxPrice is 0 or return value of FindTaxablePrice()

void find_price(in POS::Barcode item,

in long quantity,

out float item_price,

out float item_tax_price,

out ItemInfo item_info)

raises (BarcodeNotFound);

};

};

Page 27: Contoh Kasus

27

IDL Module CentralOffice

module CentralOffice

{

interface Depot {

void find_item_info(

in AStore::AStoreId store_id,

in POS::Barcode item,

in long quantity,

out AStore::ItemInfo item_info)

raises (AStore::BarcodeNotFound);

};

};