Apa itu UML Class Diagram?
Class diagrams are the backbone of almost every object-oriented method including UML. Class diagram adalah tulang punggung hampir semua metode berorientasi objek termasuk UML. They describe the static structure of a system. Mereka menggambarkan struktur statis dari sebuah sistem.Dasar Class Diagram Simbol dan notasi
Classes represent an abstraction of entities with common characteristics. Kelas mewakili sebuah abstraksi entitas dengan ciri-ciri umum. Associations represent the relationships between classes. Asosiasi mewakili hubungan antara kelas-kelas.Ilustrasikanlah kelas dengan empat persegi panjang dibagi ke dalam kompartemen. Place the name of the class in the first partition (centered, bolded, and capitalized), list the attributes in the second partition, and write operations into the third. Letakkan nama kelas di partisi pertama (tengah, tebal, dan dikapitalisasi), daftar atribut di partisi kedua, dan Operasi tulis ke dalam ketiga.
Learn how to create this symbol. Pelajari cara membuat simbol ini.
Kelas aktif
Active classes initiate and control the flow of activity, while passive classes store data and serve other classes. Kelas aktif memulai dan mengendalikan aliran kegiatan, sedangkan kelas pasif menyimpan data dan melayani kelas-kelas lain. Illustrate active classes with a thicker border. Ilustrasikanlah kelas aktif dengan perbatasan yang lebih tebal.Visibility
Use visibility markers to signify who can access the information contained within a class. Gunakan spidol untuk menandai visibilitas yang dapat mengakses informasi yang terkandung di dalam kelas. Private visibility hides information from anything outside the class partition. Swasta visibilitas menyembunyikan informasi dari apa pun di luar kelas partisi. Public visibility allows all other classes to view the marked information. Visibilitas publik memungkinkan semua kelas-kelas lain untuk melihat informasi yang ditandai. Protected visibility allows child classes to access information they inherited from a parent class. Learn how to edit text. Visibilitas dilindungi kelas anak memungkinkan untuk mengakses informasi yang mereka mewarisi dari orangtua kelas. Pelajari cara mengedit teks.Asosiasi
Associations represent static relationships between classes. Asosiasi mewakili hubungan antara kelas statis. Place association names above, on, or below the association line. Nama asosiasi tempat di atas, pada, atau di bawah garis asosiasi. Use a filled arrow to indicate the direction of the relationship. Gunakan diisi panah untuk menunjukkan arah hubungan. Place roles near the end of an association. Peran tempat di dekat akhir sebuah asosiasi. Roles represent the way the two classes see each other. Peran mewakili cara dua kelas saling melihat.Note: It's uncommon to name both the association and the class roles. Catatan: Ini jarang nama baik asosiasi dan peran kelas.
Learn how to edit text. Pelajari cara mengedit teks.
Keserbaragaman (kardinalitas)
Place multiplicity notations near the ends of an association. Notasi banyaknya tempat di dekat ujung asosiasi. These symbols indicate the number of instances of one class linked to one instance of the other class. Simbol-simbol ini menunjukkan jumlah kasus dari satu kelas dikaitkan dengan satu contoh kelas yang lain. For example, one company will have one or more employees, but each employee works for one company only. Sebagai contoh, satu perusahaan akan memiliki satu atau lebih karyawan, tetapi masing-masing karyawan bekerja untuk satu perusahaan saja.
Kendala
Place constraints inside curly braces {}. Tempat kendala dalam kurung kurawal ().
Komposisi dan Aggregation
Composition is a special type of aggregation that denotes a strong ownership between Class A, the whole, and Class B, its part. Komposisi adalah bentuk khusus dari agregasi yang menunjukkan kepemilikan yang kuat antara Kelas A, seluruh, dan Kelas B, bagiannya. Illustrate composition with a filled diamond. Menggambarkan komposisi dengan penuh berlian. Use a hollow diamond to represent a simple aggregation relationship, in which the "whole" class plays a more important role than the "part" class, but the two classes are not dependent on each other. Gunakan hampa berlian untuk mewakili hubungan agregasi sederhana, di mana "seluruh" kelas memainkan peran yang lebih penting daripada "bagian" kelas, tapi yang dua kelas tidak tergantung pada satu sama lain. The diamond end in both a composition and aggregation relationship points toward the "whole" class or the aggregate. Akhir berlian baik dalam komposisi dan hubungan agregasi poin menuju "seluruh" kelas atau agregat.
Generalisasi
Generalization is another name for inheritance or an "is a" relationship. Generalisasi adalah nama lain untuk warisan atau "adalah sebuah" hubungan. It refers to a relationship between two classes where one class is a specialized version of another. Ini mengacu pada hubungan antara dua kelas dimana satu kelas adalah versi khusus lain. For example, Honda is a type of car. Sebagai contoh, Honda adalah jenis mobil. So the class Honda would have a generalization relationship with the class car. Jadi kelas Honda akan memiliki hubungan generalisasi dengan mobil kelas.Dalam kehidupan nyata contoh kode, perbedaan antara warisan dan agregasi dapat membingungkan. Jika anda memiliki hubungan agregasi, agregat (keseluruhan) hanya dapat mengakses fungsi UMUM bagian kelas. On the other hand, inheritance allows the inheriting class to access both the PUBLIC and PROTECTED functions of the superclass. Di sisi lain, mewarisi warisan memungkinkan kelas untuk mengakses kedua yang UMUM dan fungsi PROTECTED SUPERCLASS.
Learn how to draw a generalization relationship. Pelajari cara menggambar hubungan generalisasi.












0 komentar:
Posting Komentar