1 / 31

Structural Modelling

Structural Modelling. Tujuan. Memahami aturan dan notasi class dan object diagram Memahami langkah-langkah pembuatan class dan object diagram Memahami keterkaitan antara use-case dan structural model. Deskripsi.

lynn
Download Presentation

Structural Modelling

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Structural Modelling

  2. Tujuan • Memahamiaturandannotasi class dan object diagram • Memahamilangkah-langkahpembuatan class dan object diagram • Memahamiketerkaitanantara use-case dan structural model

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

  4. 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 doesn’t represent software component or classes in an OO programming language. • 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

  5. Tujuan Structural Modelling • 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. • Represent the things, ideas, or concepts, that is, the objects, contained in the domain of the problem and their relationships.

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

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

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

  9. class-resbonsibility-collaboration card

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

  11. A CRC Card

  12. class diagram

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

  14. Example

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

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

  17. Relationship • Tepatsatu • Sebuah Department hanyamemilikisatu Boss • Nolataulebih • Satu Employee memilikinolataubanyak Child • Satuataulebih • Satu Boss memimpinsatuataulebih Employee Department Employee Boss Boss Child Employee 0 .. * 1..* 1

  18. Nolatausatu • Seorang Employee dapatmenikahdengannolatausatupasangan • Kisarantertentu • Seorang Employee dapatmemperolehjatah Vacation 2 hingga 4 kali per tahun • Multiple, disjoint ranges • Seorang Employee adalahanggotadarisatuhinggatigaatau lima komite Employee Employee Employee Spouse Vacation Comitte 1..3, 5 0..1 2..4

  19. 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 • Example : Gejala Penyakit Pengobatan

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

  21. Object Diagram

  22. Object Identification • Common approaches : • Textual analysis • Common object lists • Patterns

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

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

  25. Patterns • 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 : • a transaction class • a transaction line item class • an item class • a location class • a participant class

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

  27. Class Tasks • Gambarlah class diagram untukkelas-kelasberikut : Movie (title, producer, length, director, genre) Ticket (price, adult or child, showtime, movie) Patron (name, adult or child, age) • Gambarlah class diagram untukkelas-kelasberikut : 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)

  28. Gambarkanrelasi-relasiberikut : • Seorangpasienhanyabolehmendaftarkeseorangdokter, danseorangdokterbolehmemeriksabanyakpasien • Seorangpegawaidapatmemilikisatuekstensitelpon, dansatunomorekstensitelponhanyadiberikanuntuksatupegawai • Sebuahteaterdapatmenayangkanbanyakfilemdansebuah film dapatditayangkandibanyakteater

  29. Buatlah class diagram untuksituasiberikut : Saatpasienpertama kali berkonsultasi, merekaharusmengisiinformasipasien yang berisi data-data tentangnama, alamat, nomortelpon, danasuransi yang disimpandi file informasipasien. Pasienhanyadapatterdaftarpadasatuasuransi. Seorangpasienhanyadapatberkonsultasidenganseorangdokter. Setiap kali pasienmengunjungidokter, sebuahklaimasuransidikirimkepadapihakasuransiberkaitandenganpembayaran. Klaimberisiinformasikunjunganyaitutentangtanggal, tujuan, danbiaya. Seorangpasienbisamengajukanmaksimal 2 klaimdihari yang sama.

  30. TugasKelompok • Buat paper tentang : Object Based Formal Specification (OBFS) • Aturan : • Minimal berasaldari 2 jurnal • Tulisandalambahasa Indonesia denganstrukturdantatabahasa yang tepat. • Ditulisdikertas A4, minimal 5 halaman(tidaktermasuk cover). • Cantumkanreferensi yang digunakan • Dikumpulkan via email dalam format pdfpaling lambat2 Juni 2011

More Related