Presentasi sedang didownload. Silahkan tunggu

Presentasi sedang didownload. Silahkan tunggu

Unified Modeling Language User Guide

Presentasi serupa


Presentasi berjudul: "Unified Modeling Language User Guide"— Transcript presentasi:

1 Unified Modeling Language User Guide
Section 2—Basic Structural Modeling Chapter 8—Class Diagrams

2 Overview Modeling simple collaborations.
Sung Kim Modeling simple collaborations. Modeling a logical database schema. Forward and reverse engineering. CS6359 Chapter 8

3 Class Diagram Typical Contents Classes Interfaces Collaborations
Relationships Dependencies Generalizations Associations Notes Tipe Isi-isi Kelas-kelas Antarmuka-antarmuka Collaborations Relationships Ketergantungan-ketergantungan Generalizations Persatuan-persatuan Catatan-catatan Sung Kim CS6359 Chapter 8 See UML text pg. 106 (figure 8-1) for an example of a class diagram. Note: correction from the previous lecture: member and manager are roles not the names of association. However, the {subset} still applies between two associations.

4 Class Diagram Uses Model static design view of a system.
Vocabulary of the system. Collaborations Logical database schema. Model pendesainan nyataik tampilan sesistem. Kosakata sistem. Collaborations Bersifat logika database schema. Sung Kim CS6359 Chapter 8

5 Modeling Simple Collaborations
Identify the mechanism to be modeled; a mechanism represents some function or behavior. For each mechanism, identify the classes, interfaces, and other collaborations that participate in this collaboration. Identify the relationships among those entities. Use scenarios to walk through the model. Untuk masing-masing mechanism, ciri kelas-kelas, antarmuka-antarmuka, dan lain collaborations yang berpartisipasi dalam hal ini collaboration. ciri relationships diantara kemasukan-kemasukan itu. menggunakan skenario-skenario untuk berjalan melalui model. Sung Kim CS6359 Chapter 8

6 Example Collaboration
Sung Kim CS6359 Chapter 8

7 Modeling a Logical Database
Identify classes whose state must be persistent. Create a class diagram using standard tagged value. Expand to include structural details, specifically attributes and associations. Identify common patterns which cause database problems; create intermediate abstractions if necessary. Use tools if available to transform logical design into physical design. ciri keberhentian kelas-kelas tinggal harus menjadi tekun. menciptakan sebuah kelas diagram standar pemakaian melabeli nilai. memperluas untuk termasuk bersifat struktur detail-detail, sifat-sifat dengan secara tetap dan persatuan-persatuan. ciri pola-pola yang umum yang mana sebab database masalah-masalah; buat tawanan abstractions jika perlu. menggunakan alat-alat jika tersedia untuk berubah bentuk bersifat logika mendesain menjadi bersifat fisik mendesain. Sung Kim CS6359 Chapter 8

8 Example Logical Database
Sung Kim CS6359 Chapter 8

9 Forward Engineering ubah diagrm ke kode
Forward engineering—the process of transforming a model into code through a mapping to an implementation language. Steps Identify the rules of mapping to a specific language. Constrain use of UML to match language semantics (e.g. inheritance). Use tagged values to identify language. Use tools when possible. Maju orang—proses perubahan bentuk sebuah model menjadi kode melalui sebuah peta untuk sebuah terapan bahasa. Langkah-langkah ciri peraturan-peraturan dari memetakan untuk sebuah bahasa yang tetapik. Constrain memakai UML untuk bahasa yang sesuai semantics (e.g. warisan). Guna melabeli nilai-nilai untuk ciri bahasa. menggunakan alat-alat jika memungkinkan Sung Kim CS6359 Chapter 8

10 Example Forward Engineering
Sung Kim public abstract class EventHandler { private EventHandler successor; private Integer currentEventId; private String source; EventHandler() {} public void handleRequest() {} } CS6359 Chapter 8

11 Reverse Engineering kode ke diagram
Reverse engineering—the process of transforming code into a model through mapping from a specific implementation language. Steps Identify the rules of mapping from a specific language. Use a tool; point the tool to the code. Query the model to obtain desired information for the model. penginsinyuran Balik—proses perubahan bentuk kode kedalam sebuah model melalui memetakan dari sebuah bahasa terapan tetapik. Langkah-langkah ciri peraturan-peraturan dari memetakan dari sebuah bahasa yang tetapik. menggunakan sebuah alat; menunjukkan alat ke kode. model itu untuk memperoleh menginginkan informasi untuk model. Sung Kim CS6359 Chapter 8

12 Hints & Tips Separate your analysis models from your design models.
Different levels of abstraction. Different contextual vocabulary. Elements of a well-structure class diagram. Focused on one aspect of a system’s static design view. Contains only essential elements for that aspect. Provides sufficient details for the level of abstraction. berpisah model-model analysismu dari model-model pendesainanmu. Berbeda tingkat-tingkat abstraction. kosakata bersifat konteks Berbeda. Elemen-elemen sebuah kebaikan-diagram kelas struktur. yang terPusat di satu aspect sesistem ’s pendesainan nyataik tampil. Isi-isi hanya pokok elemen-elemen untuk itu aspect. Penyediaan-penyediaan detail-detail yang cukup untuk tingkat dari abstraction. Sung Kim CS6359 Chapter 8

13 Hints & Tips (cont’d) Give diagrams a name that communicates their purpose. Diagram layout. Minimize crossing of arcs. Co-locate semantically related elements. Use notes and color as visual cues. In general one relationship type will dominate each diagram; don’t confuse the issue. memberikan diagram-diagram sebuah nama yang membicarakan tujuan mereka. Diagram layout. Kecil menyeberang terbusur-busur. melokalkan-Co semantically menghubungkan elemen-elemen. menggunakan catatan-catatan dan warna seperti visi tongkat-tongkat bilyar. dalam umum satu relationship mengetik akan mendominasi masing-masing diagram; kenakan’t bingung terbitan. Sung Kim CS6359 Chapter 8

14 Summary Class diagram contents. Modeling simple collaborations.
Modeling logical databases. Forward engineering Reverse engineering. Sung Kim CS6359 Chapter 8


Download ppt "Unified Modeling Language User Guide"

Presentasi serupa


Iklan oleh Google