Class Diagram


Notation

../../UAS S4/CR/ex/Pasted image 20240624162353.png

Access Modifiers

ex/Pasted image 20241027170453.png|300

Relations (Arrows)

ex/Pasted image 20241027170539.png

Association

Class1 and Class2 is related in some way
Can also have a no fill arrow to show the direction
ex/Pasted image 20241027170558.png

Inheritance

SubClass1 and SubClass2 both inherit from SuperClass
ex/Pasted image 20241027170614.png

Aggregation

Class1 is part of Class2
(The one with the diamond is part of, the aggregated)
ex/Pasted image 20241027170630.png

Composition

Class1 cannot exist withou Class2 and vice versa
ex/Pasted image 20241027170648.png

Realization

The Person and Corporation class implements the Owner interface
ex/Pasted image 20241027170659.png

Dependency

Class1 depends on Class2
Class1 has a method with Class2 as the parameter
ex/Pasted image 20241027170708.png

ex/Pasted image 20241027170716.png