![Page 1: System Analysis and Design - whyphi.staff.telkomuniversity ... · nomor account. Account di Bank dapat berupa Tabungan dan Deposito. •Setiap account dapat melakukan transaksi yang](https://reader031.vdocuments.us/reader031/viewer/2022013019/5e1e1b5f5c3c32490a7170e2/html5/thumbnails/1.jpg)
System Analysis and Design
Class Diagram
![Page 2: System Analysis and Design - whyphi.staff.telkomuniversity ... · nomor account. Account di Bank dapat berupa Tabungan dan Deposito. •Setiap account dapat melakukan transaksi yang](https://reader031.vdocuments.us/reader031/viewer/2022013019/5e1e1b5f5c3c32490a7170e2/html5/thumbnails/2.jpg)
Class Diagram Component
• Class & Object• Attributes & Operation
• Associations• Association Class
• Aggregation & Composition
• Generalization
![Page 3: System Analysis and Design - whyphi.staff.telkomuniversity ... · nomor account. Account di Bank dapat berupa Tabungan dan Deposito. •Setiap account dapat melakukan transaksi yang](https://reader031.vdocuments.us/reader031/viewer/2022013019/5e1e1b5f5c3c32490a7170e2/html5/thumbnails/3.jpg)
Class Diagram Syntax
A CLASS
AN ATTRIBUTE
AN OPERATION
AN ASSOCIATION
Class 1
-attribute
+operation ()
Attribute name/derived attribute name
operation name ()
1..* 0..1______verb phrase____
![Page 4: System Analysis and Design - whyphi.staff.telkomuniversity ... · nomor account. Account di Bank dapat berupa Tabungan dan Deposito. •Setiap account dapat melakukan transaksi yang](https://reader031.vdocuments.us/reader031/viewer/2022013019/5e1e1b5f5c3c32490a7170e2/html5/thumbnails/4.jpg)
Classes• Templates for creating instances or objects
• Types of class• Concrete (has objects)
• Abstract
• Another types: the type of real-world thing that it represents• Application domain, user interface, data structure, file
structure, operating environment, document, and multimedia classes
![Page 5: System Analysis and Design - whyphi.staff.telkomuniversity ... · nomor account. Account di Bank dapat berupa Tabungan dan Deposito. •Setiap account dapat melakukan transaksi yang](https://reader031.vdocuments.us/reader031/viewer/2022013019/5e1e1b5f5c3c32490a7170e2/html5/thumbnails/5.jpg)
Attributes
• Units of information relevant to the description of the class
• Only attributes important to the task should be included
• include only those attributes that are relevant to the current application
• “size” for a TV object is not necessary if the application is concerned only with connections between TV and other objects
• do not attempt to include every attribute at the beginning• more attributes can be added when the model is iterated
• iteration of the model occurs almost at all times, particularly for large projects
![Page 6: System Analysis and Design - whyphi.staff.telkomuniversity ... · nomor account. Account di Bank dapat berupa Tabungan dan Deposito. •Setiap account dapat melakukan transaksi yang](https://reader031.vdocuments.us/reader031/viewer/2022013019/5e1e1b5f5c3c32490a7170e2/html5/thumbnails/6.jpg)
Attributes (Cont)
• Avoid derivable attributes; instead, create a function to derive each such attribute• “age” can be derived from “birthday” and “current-date”
• “total” of all transactions can be dynamically computed when necessary, rather than storing it somewhere
• “discount price” can be computed using current-price and discount factor
![Page 7: System Analysis and Design - whyphi.staff.telkomuniversity ... · nomor account. Account di Bank dapat berupa Tabungan dan Deposito. •Setiap account dapat melakukan transaksi yang](https://reader031.vdocuments.us/reader031/viewer/2022013019/5e1e1b5f5c3c32490a7170e2/html5/thumbnails/7.jpg)
Operations
• Action that instances/objects can take
• Focus on relevant problem-specific operations (at this point)
![Page 8: System Analysis and Design - whyphi.staff.telkomuniversity ... · nomor account. Account di Bank dapat berupa Tabungan dan Deposito. •Setiap account dapat melakukan transaksi yang](https://reader031.vdocuments.us/reader031/viewer/2022013019/5e1e1b5f5c3c32490a7170e2/html5/thumbnails/8.jpg)
Association Classes
Miscellaneous relationships between classesA patient – an appointment
![Page 9: System Analysis and Design - whyphi.staff.telkomuniversity ... · nomor account. Account di Bank dapat berupa Tabungan dan Deposito. •Setiap account dapat melakukan transaksi yang](https://reader031.vdocuments.us/reader031/viewer/2022013019/5e1e1b5f5c3c32490a7170e2/html5/thumbnails/9.jpg)
Generalization
• Enables inheritance of attributes and operations
• Ex:• A CUSTOMER class and an
EMPLOYEE class can be generalized into a PERSON class by extracting the attributes and operations in common
• It is represented with the a-kind-of relationship
![Page 10: System Analysis and Design - whyphi.staff.telkomuniversity ... · nomor account. Account di Bank dapat berupa Tabungan dan Deposito. •Setiap account dapat melakukan transaksi yang](https://reader031.vdocuments.us/reader031/viewer/2022013019/5e1e1b5f5c3c32490a7170e2/html5/thumbnails/10.jpg)
Composition & Aggregation
Relates parts to wholesA part of or has parts
A door is a part of a carAn employee is a-part of a department
![Page 11: System Analysis and Design - whyphi.staff.telkomuniversity ... · nomor account. Account di Bank dapat berupa Tabungan dan Deposito. •Setiap account dapat melakukan transaksi yang](https://reader031.vdocuments.us/reader031/viewer/2022013019/5e1e1b5f5c3c32490a7170e2/html5/thumbnails/11.jpg)
Identify as association if it is not clear whether it is association or aggregation
• “Mail” has “Address” (aggregation)
• “Mail” uses “Address” for delivery (association)
• “Customer” has “Address” (aggregation)
• “Customer” resides at “Address” (association)
• “TV” includes “Screen” (aggregation)
• “TV” sends information to “Screen” (association)
• “Customer” is a “Users” (generalization/specialization)
![Page 12: System Analysis and Design - whyphi.staff.telkomuniversity ... · nomor account. Account di Bank dapat berupa Tabungan dan Deposito. •Setiap account dapat melakukan transaksi yang](https://reader031.vdocuments.us/reader031/viewer/2022013019/5e1e1b5f5c3c32490a7170e2/html5/thumbnails/12.jpg)
Multiplicity of relationship
![Page 13: System Analysis and Design - whyphi.staff.telkomuniversity ... · nomor account. Account di Bank dapat berupa Tabungan dan Deposito. •Setiap account dapat melakukan transaksi yang](https://reader031.vdocuments.us/reader031/viewer/2022013019/5e1e1b5f5c3c32490a7170e2/html5/thumbnails/13.jpg)
Example - Online shop
![Page 14: System Analysis and Design - whyphi.staff.telkomuniversity ... · nomor account. Account di Bank dapat berupa Tabungan dan Deposito. •Setiap account dapat melakukan transaksi yang](https://reader031.vdocuments.us/reader031/viewer/2022013019/5e1e1b5f5c3c32490a7170e2/html5/thumbnails/14.jpg)
CASE 1
Give explanation for this class diagram
![Page 15: System Analysis and Design - whyphi.staff.telkomuniversity ... · nomor account. Account di Bank dapat berupa Tabungan dan Deposito. •Setiap account dapat melakukan transaksi yang](https://reader031.vdocuments.us/reader031/viewer/2022013019/5e1e1b5f5c3c32490a7170e2/html5/thumbnails/15.jpg)
Case 2
Buatlah sebuah class diagram untuk sebuah Bank berdasarkan deskripsiberikut:
• Bank memiliki banyak cabang yang dapat diidentifikasi berdasarkan kodedan alamatnya
• Di setiap cabang memiliki account yang menyimpan informasi saldo dannomor account. Account di Bank dapat berupa Tabungan dan Deposito.
• Setiap account dapat melakukan transaksi yang memiliki ID trans, tanggal, tipe, jumlah, dan saldo setelah transaksi.
• Satu nasabah dapat memiliki satu atau lebih account di cabang. Seorangnasabah memiliki informasi nama, alamat, tanggal lahir.
• NOTE: identifikasi operation/method yang dapat dimiliki oleh masing2 class
![Page 16: System Analysis and Design - whyphi.staff.telkomuniversity ... · nomor account. Account di Bank dapat berupa Tabungan dan Deposito. •Setiap account dapat melakukan transaksi yang](https://reader031.vdocuments.us/reader031/viewer/2022013019/5e1e1b5f5c3c32490a7170e2/html5/thumbnails/16.jpg)
Case 3
• Create Use Case Diagram from iGracias case study• Write additional assumption (if any)