Visualisasi Class dan Association Relationship

Slides:



Advertisements
Presentasi serupa
Slide 3-1 Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition Revised by IB & SAM, Fasilkom UI, 2005 Exercises Apa saja komponen utama.
Advertisements

CLASS DIAGRAM.
UML (Unified Modelling Language)
USE CASE DIAGRAM.
KelompoK 4 Agus Dwi Prayogo / 2928 Rian Chikita / 2942
Interaksi Objek.
Pemrograman Berbasis Obyek
PEMODELAN SISTEM INFORMASI
SQL 2. Database TRANSACTION Tabel yang terlibat : Customer berisi data pelanggan (nama, alamat, dll) OderInfo berisi info pemesanan oleh pelanggan (tgl.
Game Theory Purdianta, ST., MT..
Activity Diagram Shinta P.. For Bussiness Modeling, Activity diagrams describe the activities of a class. It is used for the following purposes: (Bennet.
1 DATA STRUCTURE “ STACK” SHINTA P STMIK MDP APRIL 2011.
Perancangan Berorientasi Objek (Object Oriented Analysis & Design)
Presented By : Group 2. A solution of an equation in two variables of the form. Ax + By = C and Ax + By + C = 0 A and B are not both zero, is an ordered.
METHOD, ARRAY DAN STRING
PEMBUATAN MODEL DATA dan DESAIN DATABASE
Class Diagram.
UNIFIED MODELLING LANGUAGE (UML)
CLASS DIAGRAM Materi Pertemuan 26
PERTEMUAN KE-6 UNIFIED MODELLING LANGUAGE (UML) (Part 2)
9.3 Geometric Sequences and Series. Objective To find specified terms and the common ratio in a geometric sequence. To find the partial sum of a geometric.
KONSEP DASAR PENDEKATAN OBJEK
USE CASE DIAGRAM.
UNIFIED MODELLING LANGUAGE
CLASS DIAGRAM.
Analisa dan Perancangan Berbasis Objek
USE CASE DIAGRAM.
Object-Oriented Design (OOD)
CLASS DIAGRAM Kelompok 2 Moch Riesdyan mulya ( )
E. Haodudin Nurkifli Universitas Ahmad Dahlan Pertemuan
Matakuliah : M0086/Analisis dan Perancangan Sistem Informasi
Rinci Kembang Hapsari,S.Si, M.Kom
Pertemuan 23 Sequence Diagram
Notasi Object Oriented System
USE CASE DIAGRAM.
ADBO (Analisa Desain Berorientasi Obyek)
Rekayasa Perangkat Lunak Class Diagram
PEMODELAN SISTEM INFORMASI
Class Diagram Level Design
Relationship Between Classes
Intro to OOP Yesi Novia, S.Kom.
Intro to OOP Yesi Novia, S.Kom.
UML mendukung pengembangan aplikasi
UNIFIED MODELLING LANGUAGE
Association, Composition dan Inheritance
CLASS DIAGRAM.
CLASS DIAGRAM Pertemuan 6.
OOAD – TI S1 Defri Kurniawan UDINUS
Pemrograman Berorientasi Objek
PEMODELAN SISTEM INFORMASI
All sections to appear here
UML Class Diagram.
Open and Closed Social Stratification
USE CASE DIAGRAM.
Kk ilo Associative entity.
Statechart , Class, Component & Deployment Diagram
Statechart , Class, Component & Deployment Diagram
ANALISIS & DESAIN SISTEM
Unified Modelling Languange (UML)
UML- UNIFIED MODELING LANGUAGE
Pertemuan 4 CLASS DIAGRAM.
Visualisasi class dan Relationship Bag. 2
Cosmas Haryawan STMIK AKAKOM Yogyakarta
How Can I Be A Driver of The Month as I Am Working for Uber?
Pertemuan 9 UML Diagram Class & Diagram Objek
Rekayasa Perangkat Lunak
OBJECT ORIENTED ANALISYS AND DESIGN
Pertemuan 14 Class Diagram.
Pemrograman berorientasi objek
Rank Your Ideas The next step is to rank and compare your three high- potential ideas. Rank each one on the three qualities of feasibility, persuasion,
Transcript presentasi:

Visualisasi Class dan Association Relationship Oleh : Cosmas Haryawan -- Pengenalan UML – Base on : Sams Teach Yourself UML in 24 Hours, Third Edition based on Sams Teach Yourself UML in 24 Hours, Third Edition (modified by cmz)

Diagram A diagram is typically a view of a part of the model, showing modeling elements and some of the relationships between them. A diagram do not have to be complete, some elements may be missing or presented in a simplified fashion. 2 kinds Diagram : Dynamic and Static Static -- they display what interacts but not what happens when they do interact based on Sams Teach Yourself UML in 24 Hours, Third Edition (modified by cmz)

9 Type Diagrams Dynamic views Static views Model Use Case Diagrams Sequence Diagrams Some part of the model might not be visible on any diagram Class Diagrams Collaboration Diagrams Object Diagrams Model Activity Diagrams Component Diagrams Statechart Diagrams Deployment Diagrams based on Sams Teach Yourself UML in 24 Hours, Third Edition (modified by cmz)

CLASS DIAGRAM Menggambarkan Objek/Class Pada Sistem Contoh : Object Class Program Tabel Data Pada Database based on Sams Teach Yourself UML in 24 Hours, Third Edition (modified by cmz)

OBJET - CLASS DIAGRAM Attribut / properti Operation/Function/Method RelationShip Note / Keterangan (Optional) based on Sams Teach Yourself UML in 24 Hours, Third Edition (modified by cmz)

CLASS DIAGRAM Nama Class Attribut / variabel Class Operation / Method Class Responsibilty atau Keterangan (tambahan / optional) based on Sams Teach Yourself UML in 24 Hours, Third Edition (modified by cmz)

Konvensi Penulisan Class Untuk nama Class : setiap kata diawali dengan huruf Besar misal Student, WashingMachine Jika diinginkan penulisan Class yang dilengkapi dengan Package-nya maka antara keduanya dibatasi double colons (dobel titik dua) Misal Household::WashingMachine based on Sams Teach Yourself UML in 24 Hours, Third Edition (modified by cmz)

Konvensi Penulisan Attribut Attribut / variabel adalah properti dari Class mampu menggambarkan rentang nilai yang bisa digunakan object (instance of class) Penulisan : Jika satu kata, diawali dengan huruf kecil Untuk kata kedua dan seterusnya, diawali dengan huruf besar based on Sams Teach Yourself UML in 24 Hours, Third Edition (modified by cmz)

Penulisan Attribut Attribut juga bisa dilengkapi dengan type data yang ditulis dengan dibatasi colon (titik dua) Bahkan bisa juga ditambahkan suatu nilai default based on Sams Teach Yourself UML in 24 Hours, Third Edition (modified by cmz)

Konvensi Penulisan Operation Operation adalah sesuatu yang bisa dilakukan oleh sebuah class atau yang dapat dilakukan oleh class lain terhadap sebuah class Konvensi penulisan sama dengan attribut, yaitu untuk satu kata diawali dengan huruf kecil sedangkan kata kedua dan seterusnya menggunakan huruf besar Untuk memperjelas setiap operation juga perlu diakhiri dengan tanda () based on Sams Teach Yourself UML in 24 Hours, Third Edition (modified by cmz)

Penulisan Operation Setiap Operation bisa ditambahkan parameter berupa variabel dan tipenya Untuk Operation yang menghasilkan suatu nilai maka bisa ditambahkan tipe data kembaliannya. based on Sams Teach Yourself UML in 24 Hours, Third Edition (modified by cmz)

Visualisasi Dalam prakteknya tidak selalu penggambaran class selalu dilengkapi dengan atribut dan operation nya based on Sams Teach Yourself UML in 24 Hours, Third Edition (modified by cmz)

Visualisasi Atau bisa juga cukup menuliskan attribut dan atau operation yang dianggap penting saja, sedangkan yang lain diwakili dengan simbol elipsis ( … ) based on Sams Teach Yourself UML in 24 Hours, Third Edition (modified by cmz)

Visualisasi Untuk Attribut atau Operation yang banyak, dapat juga ditambahkan suatu kata kunci penjelas based on Sams Teach Yourself UML in 24 Hours, Third Edition (modified by cmz)

Responsibility Responsibility adalah suatu gambaran / keterangan tentang apa yang dikerjakan oleh class Bertujuan memperjelas fungsi class dan menghilangkan ambigu (jika ada) Diletakkan di bagian terbawah dari class based on Sams Teach Yourself UML in 24 Hours, Third Edition (modified by cmz)

Constraint Apabila dibutuhkan suatu batasan atau aturan untuk suatu attribut maka bisa ditambahkan suatu constraint yang ditulis dalam kurung kurawal {} based on Sams Teach Yourself UML in 24 Hours, Third Edition (modified by cmz)

Attached Note Untuk keterangan penjelas, bisa ditambahkan juga pada suatu attribut dan operation based on Sams Teach Yourself UML in 24 Hours, Third Edition (modified by cmz)

Indikator Attribut / Operation + Public # Protected - Private $ Static / Derived Atribut tidak standar * Abstrak Fungsi tidak standar based on Sams Teach Yourself UML in 24 Hours, Third Edition (modified by cmz)

Contoh Atribut dan metoda dapat memiliki salah satu sifat berikut : Private, tidak dapat dipanggil dari luar class yang bersangkutan Protected, hanya dapat dipanggil oleh class yang bersangkutan dan anak-anak yang mewarisinya Public, dapat dipanggil oleh siapa saja Account balance: Real = 0 <<constructor>> +addAccount() <<process>> +setBalance( a : Account) +getBalance(a: Account): Amount … <<query>> isValid( loginID : String): Boolean based on Sams Teach Yourself UML in 24 Hours, Third Edition (modified by cmz)

Visualisasi Object Suatu object, instance dari class, biasanya digambarkan lengkap dengan value dari attributnya. Penulisan nama diberikan tambahan garis bawah, dengan format : namaObject : NamaClass misal myWasher : WashingMachine : NamaClass misal : WashingMachine  disebut anonymous object based on Sams Teach Yourself UML in 24 Hours, Third Edition (modified by cmz)

Relationship based on Sams Teach Yourself UML in 24 Hours, Third Edition (modified by cmz)

Association Relasi antara 2 elemen dimana keduanya punya posisi yang sama, tidak ada yang lebih penting diantara keduanya. Digambarkan dengan garis tegas Jenis : Bidirectional : tanpa panah, atau panah di kedua ujung garis Unidirectional : satu panah di posisi yang dituju Reflexive : garis ke dirinya sendiri based on Sams Teach Yourself UML in 24 Hours, Third Edition (modified by cmz)

Association… Tanpa Role  player play on a team Dengan Role (peran atau tugas untuk tiap class) based on Sams Teach Yourself UML in 24 Hours, Third Edition (modified by cmz)

Association… Two Association Lihat tanda panah untuk menunjukkan pembacaan assosiasi based on Sams Teach Yourself UML in 24 Hours, Third Edition (modified by cmz)

Association… Beberapa class berasosiasi dengan 1 class based on Sams Teach Yourself UML in 24 Hours, Third Edition (modified by cmz)

Association with rule/constraint Terkadang assosiasi antar kelas mengikuti suatu rule tertentu a Bank Teller serves a Customer, but each Customer is served in the order in which he or she appears in line. based on Sams Teach Yourself UML in 24 Hours, Third Edition (modified by cmz)

Association with rule/constraint Salah satu type Constraint : {or} a high school student choosing either an academic course of study or a commercial one based on Sams Teach Yourself UML in 24 Hours, Third Edition (modified by cmz)

Association Class An association can have attributes and operations, just like a class. In fact, when this is the case, you have an association class. You visualize an association class the same way you show a regular class, and you use a dashed line to connect it to the association line. An association class can have associations to other classes. based on Sams Teach Yourself UML in 24 Hours, Third Edition (modified by cmz)

Association Class… Plays on association between a player and a team. The association class, Contract, is associated with the GeneralManager class. based on Sams Teach Yourself UML in 24 Hours, Third Edition (modified by cmz)

Multiplicity the number of objects in one class that relate to a single object of the associated class. Contoh : Setiap nomor Rekening harus memiliki 1 nomor ATM Rekening noRek nama tglLahir alamat Atm noAtm tglBuat tglAktif password 1 based on Sams Teach Yourself UML in 24 Hours, Third Edition (modified by cmz)

Multiplicity Setiap nomor Rekening dapat memiliki 1 nomor ATM Rekening noRek nama tglLahir alamat Atm noAtm tglBuat tglAktif password 0..1 1 based on Sams Teach Yourself UML in 24 Hours, Third Edition (modified by cmz)

Simbol Multiplicity Unspecified Exactly one 1 Zero or more (many, unlimited) 0..* * One or more 1..* Zero or one (optional scalar role) 0..1 Specified range 2..4 Multiple, disjoint ranges 2,4..6 When class A is in a one-to-zero or one multiplicity with class B, class B is said to be optional for class A. based on Sams Teach Yourself UML in 24 Hours, Third Edition (modified by cmz)

Contoh based on Sams Teach Yourself UML in 24 Hours, Third Edition (modified by cmz)

Qualified Association When an object from one class has to choose a particular object from another in order to fulfill a role in an association, the first class has to rely on a specific attribute to select the correct object. That attribute is typically an identifier, such as an ID number. For example, a hotel's reservation list has many reservations based on Sams Teach Yourself UML in 24 Hours, Third Edition (modified by cmz)

Qualified… Dalam UML key / ID information disebut Qualifier dan menjadi satu bagian dengan assosiasi “one to many” Meski ReservationList dan Reservation “one to many” tetapi confirmationNumber dan Reservation “one to one” based on Sams Teach Yourself UML in 24 Hours, Third Edition (modified by cmz)

Reflexive Association Sometimes, a class is in an association with itself. Referred to as a reflexive association This can happen when a class has objects that play a variety of roles. For example, a CarOccupant can be either a driver or a passenger. In the role of the driver, one CarOccupant drives zero or more additional CarOccupants who play the role of passenger. based on Sams Teach Yourself UML in 24 Hours, Third Edition (modified by cmz)

Any Question? based on Sams Teach Yourself UML in 24 Hours, Third Edition (modified by cmz)