Presentasi sedang didownload. Silahkan tunggu

Presentasi sedang didownload. Silahkan tunggu

JUST A LINE MANAGEMENT Pertemuan 23

Presentasi serupa


Presentasi berjudul: "JUST A LINE MANAGEMENT Pertemuan 23"— Transcript presentasi:

1

2 JUST A LINE MANAGEMENT Pertemuan 23
Matakuliah : Konsep object-oriented Tahun : 2009 JUST A LINE MANAGEMENT Pertemuan 23

3 Studi kasus Just A Line Management

4 Tahap membuat class diagram
Identifikasikan obyek dan class turunannya Identifikasikan atribut class Mulai membuat kamus data Identifikasikan operasi tiap class Gunakan teknik CRC untuk mengkover tanggung jawab dan kolaborasi Identifikasikan hubungan antar class, menggunakan asosiasi, agregasi dan inheritance Iterasikan dan definisikan model

5 Identifikasikan obyek dan class turunannya
Identifikasikan obyek fisik dan konsep yang potensial didalam problem domain Just A Line management wishes to increase security, both their building and on site, without antagonizing their employees. They would also like to prevent people who are not part of the company from using the Just a Line car park. It has been decided to issue identity cards to all employees, which their expected to wear while on Just a Line sites. The card records the name, departement and number the member of staff, and permit access to the Just A Line car park. A barrier and card reader are placed at the entrance to the car park. The driver of an approaching car inserts his or her numbered card in the card reader, which then checks that number is known to the Just A Line system. If the card is recognized, the reader send a signal to raise the barrier and the car able to enter the car park A the exit, there also barrier, which raised when a car wishes to leave the car park. When there are no spaces in the car park a sign at the entrance display Full and is only switched off when a card is leaves. Special visitors cards which record a number and the current date also permit acces to the car park. Visitors cards may be sent out in advance, or collected from reception . All visitors cards must be returned to reception when visitor leave Just A Line

6 Daftarkan obyek fisik dan obyek konsep yang ada diproblem domain
Just A Line management security building site employee people company car park card name departement number member of staff access barrier card reader entrance driver car system signal exit space sign visitor reception

7 Pelajari obyek dan buat obyek yang tidak berguna. Buang jika :
Duplikat Tidak relevan Mempunyai arti ganda Terlalu umum Merupakan atribut Merupakan asosiasi Merupakan aturan(Roles) Merupakan implementasi

8 Duplikat Jika ada dua atau lebih obyek yang berbeda nama tetapi menunjuk ke hal yan sama, hanya satu yang digunakan, buang yang lainnya Contohnya : employee/member of staff dan company/Just a Line management security building site employee people company car park card name departement number access barrier card reader entrance driver car system signal exit space sign visitor reception Just A Line member of staff

9 Tidak relevan Obyek berada didalam problem domain tetapi tidak merupakan bagian dari sistem, dibuang saja Contohnya : management, site, company, visitor dan reception security employee people car park card name departement number access barrier card reader entrance driver car system signal exit space sign management building site company visitor reception

10 Mempunyai arti ganda (Vague)
Ketika sebuah kata dibaca dengan hati-hati, kadang sebuah kata tidak mempunyai arti yang tepat sehingga tidak dapat dijadikan basis data contohnya : security dan people employee car park card name departement number access barrier card reader entrance driver car system signal exit space sign security people

11 Terlalu umum Sebuah kata seperti kata sistem tidak bisa menjadi class yang berguna karena terlalu umum artinya: employee car park card name departement number access barrier card reader entrance driver car signal exit space sign system

12 Attributes Sometime we discover a word is a part of some other class. Such departement, name and number may be would be attributes of the class card employee car park card access barrier card reader entrance driver car signal exit space sign name departement number

13 Asosiasi Kadang sebuah kata, seperti “ACCESS” keluar sebagai obyek, tetapi sebetulnya kata tersebut mewakili relasi antar obyek employee car park card barrier card reader entrance driver car signal exit space sign access

14 Aturan (Roles) Jangan ambil sebuah kata yang bersifat aturan(role) sebagai anggota class diagram kata “driver” hanya berlaku sementara, sesorang yang mengendarai kednaraan bermotor, jika sudah tidak mengendarai tidak dapat disebut driver lagi employee car park card barrier card reader entrance car signal exit space sign driver

15 Implementasi Jangan mengambil sebuah kata sebagai class, jika kata tersebut nantinya akan digunakan diwaktu implementasi contoh “SIGNAL” employee car park card barrier card reader entrance car exit space sign signal

16 Find any missed class Is common sense if we have include a “sensor” into class, because need sensor for each barrier to opened the barrier if any car arrives and leaves.

17 Potential class in Just A Line
Car Park Staff Card Visitor Card Employee Entrance Exit Card reader Barrier Full Sign Space Sensor Car

18 Identifikasikan atribut sebuah class
Identifikasikan aribut dari kata-kata. Kumpulkan data yang penting dan relevan tentang obyek tersebut dan buang informasi yang tidak relevan Buang atribut jika dapat diturunkan dari class lain. Ketika kita memikirkan atribut. Sering kali kita menemukan bahwa: Detil yang sama dari dua class yang berbeda, misalnya employee dengan staf card, artinya salah satunya tidak berguna, dapat dibuang. Tidak ada atribut atau sesuatu yang dilakukan oleh class tersebut, contohnya : entrance, exit, car and space, karena tidak berguna dapat dibuang

19 Employee Entrance Exit Space Car Car Park Staff Card Visitor Card
Card reader Barrier Full Sign Sensor Employee Entrance Exit Space Car

20 Mulai membangun kamus data
Car Park : represent the physical car park and keeps count of the number of spaces available Staff Card : a card, issued to a member of the just a line staff. That record the staff member number, name and departement. The number uniquely identifies. The card also permits access to Just A Line car park Visitor Card : a card, with permit access to Just A Line car park. Given to someone visiting the company. The card record number and the current date. Visitor card may be send out in advanced or collected from reception and all cards must be returned to reception when visitor leave from Just A Line. Card reader: a machine that read a card that is input and check the card number against a list of valid number. If the card is valid , the reader sends a signal to raise the barrier

21 Barrier: a bar, which raise or lower itself according the signal received from either other associate sensor or card reader. Sensor: a device for detecting the presence of a card

22 Identifikasikan operasi yang dilakukan class
Car Park Capacity spaces inc.spaces() dec.spaces() Spaces left()

23 Gunakan CRC card untuk menembukan tanggung jawab dan kolaborasi
Full Sign On : Boolean Switch on() Switch of() CRC(class-responsibility-collaboration) CRC card adalah bagian dalam metode pendekatan sistem dengan nama Responsibility-Driven-Design

24 Tujuan dari Responsibility Driven Design adalah untuk melihat semua fungsi didalam sistem dan membaginya kedalam class. Tanggung jawab untuk menyediakan layanan bagi class lain.

25 Full Sign On:Boolean Contoh: Switch on() Switch off()
Class Full sign bertanggung jawab untuk menyala ketika tidak ada lagi tempat yang tersisa didalam parkir dan padam ketika ada tempat kosong(tersedia) Full Sign On:Boolean Switch on() Switch off()

26 Kadang sebuah class berlaku sebagai server dan memberikan layanan kepada class lain dan di lain waktu berlaku sebagai client menerima layanan dari class yang lainnya Car Park Capacity spaces Inc.spaces() Dec.spaces() Spaces left() Full Sign On:boolean Switch on() Switch off() Barrier Up:boolean Raise() Lower()

27 Sebuah contoh CRC Card dengan responsibilities and collaborations
Barrier Responsibillity Collaborator Raise() Lower() Sensor

28 Jika sebuah class tidak menjadi solusi yang fleksibel
Card reader Read card() Card reader Valid card nos. Read card() Card OK() Valid Card Valid card nos. Card OK()

29 Identifikasikan hubungan apakah menggunakan association, aggregation atau inheritance
Asosiasi(association) : hubungan singkat antar obyek. Student Course studies 0..* 1..* Zero or one Exactly one 1(or ommited) Zero, one or many *, or 0..* One or more * An exact number 2,3,4, 24 An a range ,4..6

30 Card reader Read card() 1..* 1 Valid Card Valid card nos. Card OK()

31 Agregasi(Aggregation): hubungan antar obyek ketika sebuah class terdiri dari class yang lain (“part of”, ”consist of”, “made up of”).

32 Inheritance: ketika sebuah obyek merupakan spesialisasi dari class yang lain.
Kadang orang lain menyebutnya Gen-Spec

33 Sebuah class diagram komplit Just A line

34 Kamus data(Data Dictionary)
Kamus data merupakan sumber keterangan utama tentang data. Kamus data menyediakan cara yang pasti untuk mencatat data.

35 Notasi kamus data: Harus mengekspresikan: Urutan atribut yang muncul;
Atribut atau grup atribut yang berulang; Atribut yang opsional; Atribut merupakan pilihan yang harus dipilih;

36 Notasi kamus data Symbol Arti Keterangan = Terdiri dari (Consist of)
Mengindikasikan permulaan definisi dari data item + Dan(And) Pengabungan definisi komponen didalam urutan { } Satu atau lebih(One on more) Atribut mungkin berulang ( ) Kosong atau satu(Zero or one) Atribut adalah opsional [ ] Pilihan(alternatives) Isi yang berada dalam kotak merupakan pilihan yang dapat dipilih, [ ] | Atau(Either.. Or) Alternatif pilihan dipisahkan dengan garis vertikal “ ” Nilai khusus(Specific value) Mengindikasikan pilihan khusus contoh [“Y”|”T”] *..* Komentar(comment) Komentar berada didalam tanda asterik

37 Contoh employee obyek :Employee Number=JL104 Title = Mrs.
First name = Anne, Christine Last name = Raines Address = 46, ferry road. Phone number = Dept.= account

38 Employee = number + (title) + {first name}+ last name + address
Jika dilukiskan dalam kamus data dapat berbentuk seperti ini Employee = number + (title) + {first name}+ last name + address + phone number+ dept Lebih tepatnya: Employee = number + (title) + 1{ [ first name | title ] }3+ last name + address + phone number+ dept Lebih dalam lagi Dept. = [“Accounts” | “Design” | “Marketing” | “Administration” ]

39 Mendeskripsikan dokumen Just A Line Car Park List April 2003
name Dept. Ext. Car make model Number Colour Sue Preston 316 Renault Clio P0146JPG Red Harry Preston 360 Porsche Carrera JAL 1 Silver Annie Raines Account 465 Volvo 349 H4624KL White Chris doolan Design 767 VW Golf 6883PP Green Escape 65765 Grey

40 Dari dokumen tersebut dapat didefinisikan kamus data
Car Park List = month + year+ {employee name + (dept). + ext + 1{ car make + car model + car number + car colour } 2} Untuk mencegah kesalahan membaca dan membuat mudah dalam membacanya maka kamus data tersebut ditulis : Car Park List = Date + { entry } Date = month + year Entry = employee + { Car }2 Employee = name + ( dept ) + extension Dept. = [“account” | “Design” | “Marketing” | “Administration” ] Car = make + model + number + colour

41 Langkah berikutnya adalah
Membuatnya lebih detil dan Gambarkan operasi nya ) contohnya pada halaman berikut:

42 Disarikan dari kamus data sistem parkir just a line
Barrier = Barrier type + up Barrier type = [“entrance”|”exit”] up = [“true”|”False”] raise: if the barrier not already raised, this operation takes an argument an object if the barrier class and returns an object of the same class. With the up attribute set to “true”. If the barrier is already up the operation returns the error message “Barrier already raised”. lower: if the barrier not already lower, this operation takes an same class. With the up attribute set to “False”. If the barrier is already down the operation returns the error message “Barrier already lowered”.

43 Card = Number + [staff card|visitor card] delete: this operation remove the card from the set of cards known to Just A Line. Car Reader = location read card: this operation takes a card number as input and check it against the number of known card in the Valid Card class Car Park = capacity + spaces capacity:*the total number of parking places in the car park* spaces:*the number of currently free spaces in the car park* inc.spaces: this operation check that the car park is not empty (number of spaces left is not equal to capacity of the car park. In this the case the value of “space” increment by 1. dec.spaces: this operation check that value of attributes in the car park is greather than 0. in this the case the value of space decrement by 1

44 Full sign = location + on on = [ “true”|”false”] switch on: switch off: Sensor = Car Sensed car sensed=[“true”|”false”] sense car:if a car is detected by the sensor , this operation sets the car sensed attribute to “true” Staff Card = name + dept + expiry date name = first name + last name Dept. = [“Accounts” | “Design” | “Marketing” | “Administration” ] expiry date = *date after which card is no longer valid* delete: if the expiry date on the card has passed, this operation removes the card number from the list of known to just a line.

45 Valid Card = known card * the set of cards whose numbers are recorgnized by Just A Line Visitor card = current date * date that the card is issued* delete:if the date on the card has passed, this operation removes the card number from the list of known to just a line


Download ppt "JUST A LINE MANAGEMENT Pertemuan 23"

Presentasi serupa


Iklan oleh Google