Presentation is loading. Please wait.

Presentation is loading. Please wait.

Structural Modelling. Slide 2 Tujuan Memahami aturan dan notasi class dan object diagram Memahami aturan dan notasi class dan object diagram Memahami.

Similar presentations


Presentation on theme: "Structural Modelling. Slide 2 Tujuan Memahami aturan dan notasi class dan object diagram Memahami aturan dan notasi class dan object diagram Memahami."— Presentation transcript:

1 Structural Modelling

2 Slide 2 Tujuan Memahami aturan dan notasi class dan object diagram Memahami aturan dan notasi class dan object diagram Memahami langkah-langkah pembuatan class dan object diagram Memahami langkah-langkah pembuatan class dan object diagram Memahami keterkaitan antara use-case dan structural model Memahami keterkaitan antara use-case dan structural model

3 Slide 3 Deskripsi A structural model describes the structure of the data that supports the business process in an organization. A structural model describes the structure of the data that supports the business process in an organization. During the analysis phase, the structural model presentas the logical organization of data without indicating how the data are stored, created, or manipulated. During the analysis phase, the structural model presentas the logical organization of data without indicating how the data are stored, created, or manipulated. Analysts need to understand the information that is used and created by the system Analysts need to understand the information that is used and created by the system A structural model is a formal way of representing the objects that are used and created by a business system. A structural model is a formal way of representing the objects that are used and created by a business system.

4 Slide 4 It illustrates people, places, or things about which information is captured and how they are related to each other. It illustrates people, places, or things about which information is captured and how they are related to each other. At this stage, the structural models doesnt represent software component or classes in an OO programming language. At this stage, the structural models doesnt represent software component or classes in an OO programming language. It should represent the responsibilities of each class and the collaborations between the classes. It should represent the responsibilities of each class and the collaborations between the classes. Structural models are depicted using CRC cards, class diagram, and object diagram Structural models are depicted using CRC cards, class diagram, and object diagram

5 Slide 5 Tujuan Structural Modelling Reduce the semantic gap between the underlying problem domain and the evolving structural model. Reduce the semantic gap between the underlying problem domain and the evolving structural model. Create a vocabulary that can be used by both the analyst and users. Create a vocabulary that can be used by both the analyst and users. Represent the things, ideas, or concepts, that is, the objects, contained in the domain of the problem and their relationships. Represent the things, ideas, or concepts, that is, the objects, contained in the domain of the problem and their relationships.

6 Slide 6 Classes Templates for creating instances or objects Templates for creating instances or objects Concrete Concrete Abstract Abstract Typical examples: Typical examples: Application domain, user interface, data structure, file structure, operating environment, document, and multimedia classes Application domain, user interface, data structure, file structure, operating environment, document, and multimedia classes Atributes : Atributes : Units of information relevant to the description of the class Units of information relevant to the description of the class Only attributes important to the task should be included Only attributes important to the task should be included

7 Slide 7 Operations : Operations : Action that instances/objects can take Action that instances/objects can take Focus on relevant problem-specific operations (at this point) Focus on relevant problem-specific operations (at this point)

8 Slide 8 Relationship Generalization Generalization Enables inheritance of attributes and operations Enables inheritance of attributes and operations Example : staff dan nurse Example : staff dan nurse Aggregation Aggregation Relates parts to wholes Relates parts to wholes Example : house dan door,window Example : house dan door,window Association Association Miscellaneous relationships between classes Miscellaneous relationships between classes Example : patient dan appointment Example : patient dan appointment

9 CLASS-RESBONSIBILITY- COLLABORATION CARD

10 Slide 10 Content Responsibilities Responsibilities Knowing Knowing Doing Doing Collaboration Collaboration Objects working together to service a request Objects working together to service a request

11 Slide 11 A CRC Card

12 Slide 12

13 CLASS DIAGRAM

14 Slide 14 Notasi Class Diagram A CLASS AN ATTRIBUTE AN OPERATION AN ASSOCIATION ClassName -attribute +operation () Attribute name/ derived attribute name operation name () 1..*0..1 ______verb phrase____

15 Slide 15 Example

16 Slide 16 Atribut Derived attributes Derived attributes /age, for example can be calculated from birth date and current date /age, for example can be calculated from birth date and current date Visibility Visibility Public (+) Public (+) Protected (#) Protected (#) Private (-) Private (-)

17 Slide 17 Operasi Constructor Constructor Creates object Creates object Typically not written explicitly on the class diagram Typically not written explicitly on the class diagram Query Query Makes information about the state of an object available to other objects Makes information about the state of an object available to other objects Update Update Changes values of some or all attributes Changes values of some or all attributes

18 Slide 18 Relationship Tepat satu Tepat satu Sebuah Department hanya memiliki satu Boss Sebuah Department hanya memiliki satu Boss Nol atau lebih Nol atau lebih Satu Employee memiliki nol atau banyak Child Satu Employee memiliki nol atau banyak Child Satu atau lebih Satu atau lebih Satu Boss memimpin satu atau lebih Employee Satu Boss memimpin satu atau lebih Employee DepartmentBoss 1 EmployeeChild 0.. * BossEmployee 1..*

19 Slide 19 Nol atau satu Nol atau satu Seorang Employee dapat menikah dengan nol atau satu pasangan Seorang Employee dapat menikah dengan nol atau satu pasangan Kisaran tertentu Kisaran tertentu Seorang Employee dapat memperoleh jatah Vacation 2 hingga 4 kali per tahun Seorang Employee dapat memperoleh jatah Vacation 2 hingga 4 kali per tahun Multiple, disjoint ranges Multiple, disjoint ranges Seorang Employee adalah anggota dari satu hingga tiga atau lima komite Seorang Employee adalah anggota dari satu hingga tiga atau lima komite EmployeeSpouse 0..1 EmployeeVacation 2..4 EmployeeComitte 1..3, 5

20 Slide 20 Sometimes a relationship has associated properties, especially when its classes share a many-to-many relationship. Sometimes a relationship has associated properties, especially when its classes share a many-to-many relationship. In these cases, a class is formed, called an association class In these cases, a class is formed, called an association class Example : Example : GejalaPenyakit Pengobatan

21 Slide 21 Generalization & Aggregation Generalization : Generalization : Occurs when we need to use words as is a-kind-of to describe the relationship. Occurs when we need to use words as is a-kind-of to describe the relationship. Example : the blue line Example : the blue line Aggregation Aggregation Classes actually comprises other class Classes actually comprises other class Example : the red line Example : the red line

22 Slide 22 Object Diagram

23 Slide 23 Object Identification Common approaches : Common approaches : Textual analysis Textual analysis Common object lists Common object lists Patterns Patterns

24 Slide 24 Textual Analysis Analysis of the text in the use-case descriptions Analysis of the text in the use-case descriptions Starts by reviewing the use-case descriptions and the use-case diagrams. Starts by reviewing the use-case descriptions and the use-case diagrams. Identify potential objects, attributes, operations, and relationships. Identify potential objects, attributes, operations, and relationships. The nouns possible classes, the verbs possible operations The nouns possible classes, the verbs possible operations

25 Slide 25 Common Object List Simply list the objects that are common to the business domain of the system. Simply list the objects that are common to the business domain of the system. Several categories : Several categories : things things incidents incidents roles roles interactions interactions

26 Slide 26 Patterns Is a useful group of collaborating classes that provide a solution to a commonly occurring problem. Is a useful group of collaborating classes that provide a solution to a commonly occurring problem. For example : many business transactions involve the same type of objects and interactions : For example : many business transactions involve the same type of objects and interactions : a transaction class a transaction class a transaction line item class a transaction line item class an item class an item class a location class a location class a participant class a participant class

27 Slide 27 Steps for Object Identification and Structural Modeling 1. Create CRC cards by performing textual analysis on the use-cases. 2. Brainstorm additional candidate classes, attributes, operations, and relationships by using the common object list approach. 3. Role-play each use-case using the CRC cards. 4. Create the class diagram based on the CRC cards. 5. Review the structural model for missing and/or unnecessary classes, attributes, operations, and relationships. 6. Incorporate useful patterns. 7. Review the structural model.

28 Slide 28 Class Tasks 1. Gambarlah class diagram untuk kelas-kelas berikut : Movie (title, producer, length, director, genre) Ticket (price, adult or child, showtime, movie) Patron (name, adult or child, age) 2. Gambarlah class diagram untuk kelas-kelas berikut : Patient (age, name, hobbies, blood type, occupation, insurance carrier, address, phone) Insurance carrier (name, number of patients on plan, address, contact name, phone) Doctor (speciality, provider identification number, age, phone, name)

29 Slide 29 3. Gambarkan relasi-relasi berikut : a) Seorang pasien hanya boleh mendaftar ke seorang dokter, dan seorang dokter boleh memeriksa banyak pasien b) Seorang pegawai dapat memiliki satu ekstensi telpon, dan satu nomor ekstensi telpon hanya diberikan untuk satu pegawai c) Sebuah teater dapat menayangkan banyak filem dan sebuah film dapat ditayangkan di banyak teater

30 Slide 30 4. Buatlah class diagram untuk situasi berikut : Saat pasien pertama kali berkonsultasi, mereka harus mengisi informasi pasien yang berisi data- data tentang nama, alamat, nomor telpon, dan asuransi yang disimpan di file informasi pasien. Pasien hanya dapat terdaftar pada satu asuransi. Seorang pasien hanya dapat berkonsultasi dengan seorang dokter. Setiap kali pasien mengunjungi dokter, sebuah klaim asuransi dikirim kepada pihak asuransi berkaitan dengan pembayaran. Klaim berisi informasi kunjungan yaitu tentang tanggal, tujuan, dan biaya. Seorang pasien bisa mengajukan maksimal 2 klaim di hari yang sama.

31 Slide 31 Tugas Kelompok Buat paper tentang : Object Based Formal Specification (OBFS) Buat paper tentang : Object Based Formal Specification (OBFS) Aturan : Aturan : Minimal berasal dari 2 jurnal Minimal berasal dari 2 jurnal Tulisan dalam bahasa Indonesia dengan struktur dan tata bahasa yang tepat. Tulisan dalam bahasa Indonesia dengan struktur dan tata bahasa yang tepat. Ditulis di kertas A4, minimal 5 halaman (tidak termasuk cover). Ditulis di kertas A4, minimal 5 halaman (tidak termasuk cover). Cantumkan referensi yang digunakan Cantumkan referensi yang digunakan Dikumpulkan via email dalam format pdf paling lambat 2 Juni 2011 Dikumpulkan via email dalam format pdf paling lambat 2 Juni 2011


Download ppt "Structural Modelling. Slide 2 Tujuan Memahami aturan dan notasi class dan object diagram Memahami aturan dan notasi class dan object diagram Memahami."

Similar presentations


Ads by Google