Presentasi sedang didownload. Silahkan tunggu

Presentasi sedang didownload. Silahkan tunggu

1 System Behaviour (System Sequence Diagram & Contract) STMIK STIKOM BALI.

Presentasi serupa


Presentasi berjudul: "1 System Behaviour (System Sequence Diagram & Contract) STMIK STIKOM BALI."— Transcript presentasi:

1 1 System Behaviour (System Sequence Diagram & Contract) STMIK STIKOM BALI

2 Referensi Larman Chapter 13: System Sequence Diagrams Chapter 14: Contracts Chapter 32: System Behaviour 2

3 System Behaviour (perilaku) Pada fase analisis, sangatlah perlu mendefinisikan APA yang harus dilakukan oleh sistem. system didefinisikan sebagai “black box” BAGAIMANA sistem melaksanakan tanggung jawabnya tidak didefinisikan; hal ini dilakukan pada fase design logika. System behaviour (perilaku sistem) didokumentasikan dengan: System sequence diagrams Contracts 3

4 System Sequence Diagrams system sequence diagram mengilustrasikan events dari actor ke system. Pembuatan system sequence diagrams tergantung pada use cases. use cases mendeskripsikan bagaimana actors berinteraksi dengan software system. Selama interaksi ini, seorang actor menciptakan events terhadap system, meminta sebuah operasi (operation). 4

5 System Events Sebuah system event adalah sebuah input external yang diciptakan oleh actor terhadap system. Sebuah event menginisiasi operasi yang bersesuaian. Sebuah system operation adalah sebuah operasi dari sistem yang dieksekusi dalam rangka merespon sebuah system event. Awali nama sebuah system event dengan kata kerja (verb )e.g. add.., enter…, make… 5

6 Review: HVR Case Study Recall Happy Video Rental (HVR) Case Study. Use Case Diagram : 6

7 HVR Conceptual Model 7

8 High Level Use Case 8 Use Case 1 Add New Video Item ActorsClerk TypePrimary Descrip tion This use case begins when the video store acquires a new video item. The details about the video item are recorded.

9 Use Case 1 Expanded Use Case 9 Use Case 1Add New Video Item Goal in ContextTo record that a new video item has been acquired by the store. Primary ActorClerk TriggerA new video item is acquired Typical Course of Events Actor ActionSystem Response 1. This use case begins when the clerk wants to record that a new video item has been acquired by the store.

10 Use Case 1 Add New Video Item (continued) 10 Typical Course of Events Actor ActionSystem Response 2. The clerk checks records the media type, the title of the video and the producer. 3. The system checks if this is the first copy of the video item. 4. The clerk records the date acquired of the video item 5. The system generates a new barcode number for the video item and adds the number of copies for the video specification by 1. Alternative Course of Events Line 2: if the video item is the first copy, record the media type, title, producer and date released for the video specification.

11 Use Case 1 System Sequence Diagram 11 system event The clerk checks records the media type, the title of the video and the producer. if the video item is the first copy, record the media type, title, producer and date released for the video specification. The clerk records the date acquired of the video item SSD for Use Case 1: Add New Video Item From the Expanded Use Case

12 Contracts Contracts mendeskripsikan efek dari operasi di dalam system. Contracts dibuat selama fase analisis di dalam sebuah siklus pengembangan perangkat lunak. Contracts mendefinisikan perilaku sistem dalam hal perubahan status sistem apa yang terjadi ketika sebuah operasi dilibatkan. Contract menekankan terhadap apa yang akan terjadi, dibandingkan dengan bagaimana suatu hal bisa diraih. 12

13 Contracts 13

14 Menulis Contracts Bagaimana membuat contracts untuk setiap use case Identifikasi system operations dari system sequence diagrams Untuk setiap system operation, buatlah sebuah contract Deskripsikan tujuan dari operasi. Deskripsikan perubahan state dari objects di dalam conceptual model dengan mendeklarasikan Pembuatan dan penghapusan Instance Modifikasi Attribute Pembentukan dan penghancuran Associations 14

15 Contracts: Format 15 SectionDescription Namethe name of the operation, and parameters ResponsibilitiesAn informal description of the responsibilities this operation must fulfill Cross ReferencesReference numbers, use cases, etc. NotesDesign notes, algorithms ExceptionsExceptional cases Pre-conditionsAssumptions about the state of the system before execution of the operation Post-conditionsThe state of the system after completion of the operation.

16 Contracts: Example Use Case 1 memiliki SSD seperti disamping: Akan terdapat 3 contracts untuk Use Case 1. 16

17 Contracts: Use Case 1 17 NameFindVideoSpecification(type, title, producer) ResponsibilitiesTo locate the Video Specification with the given type, title and producer Pre-conditionsThe Media object must exist. The Video Specification object must exist. Post-conditionsThe Media object was found based on the type. The Video Specification object was found based on the title and producer.

18 18 NameAddVideoSpecification(type, title, producer, dateReleased) ResponsibilitiesTo create a new Video Specification Pre-conditionsThe Media object must exist. The Video Specification object must not exist. Post-conditionsThe Media object was found based on the type. A Video Specification object was created (instance creation). The attributes title, producer and dateReleased were set (attribute modification) The Video Specification object was linked to the Media object (association formed).

19 19 NameAddVideoItem(dateAcquired) ResponsibilitiesTo create a new Video Item Pre-conditionsThe Video Specification object must exist. Post-conditionsA Video Item object was created (instance creation). The attribute dateAcquired was set. (attribute modification) The attribute barcode was generated by the system and set (attribute modification). The Video Item object was linked to the Video Specification object (association formed). VideoSpecification’s numberOfCopies attribute increased by 1. The Video Item object was linked to the VideoStore object.

20 Analysis Phase Artifacts Use Case Diagram High level use case Expanded use case Conceptual model System Sequence Diagram Contracts All these diagrams examine the: system structure system responsibilities 20

21 Exercise Gambarlah System Sequence Diagrams dan tulislah Contracts untuk Use Case 2: Register Member Anda harus mengacu ke: Expanded Use Case Conceptual Model 21

22 Use Case 2 Expanded Use Case 22 Use Case 2Register Member Goal in ContextTo record that a customer has registered as a member. Primary Actor Secondary Actor Clerk Customer TriggerA Customer wants to register Typical Course of Events Actor ActionSystem Response 1. This use case begins when a customer wants to register as a member of the video store.

23 Use Case 2 (continued) 23 Actor ActionSystem Response 2. The clerk takes the deposit payment and records the customer’s name, phone and address. 3. The system calculates the membership expiry date based on the current date and generates a new memberId. 4. The customer receives a membership card. Alternative Course of Events 2a: if the customer does not have enough money to pay the deposit, cancel the use case. 2b: if the customer is a student, take the deposit and record the customer’s college name and student Id Number along with the customer’s name, phone and address. Also record the discountRate for the student.

24 Use Case 2: Register Member SSD 24


Download ppt "1 System Behaviour (System Sequence Diagram & Contract) STMIK STIKOM BALI."

Presentasi serupa


Iklan oleh Google