java-design-patterns/monitor/etc/monitor.urm.puml

13 lines
298 B
Plaintext
Raw Normal View History

add monitor design pattern (#1640) * add monitor design pattern . * add extra line and change compiler version to 11 in pom.xml. * encapsulate getBalance method . * update puml file . * export uml as png . * duplicate codes eliminated . * update tag * change the format of pom.xml * using logger to print * change AtomicRefrence to type inference var * explanations added ! * Update monitor/README.md Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com> * Update monitor/README.md Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com> * Update monitor/src/main/java/com/iluwatar/monitor/Main.java Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com> * Update monitor/src/main/java/com/iluwatar/monitor/Main.java Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com> * Update monitor/src/main/java/com/iluwatar/monitor/Main.java Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com> * Update monitor/src/main/java/com/iluwatar/monitor/Main.java Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com> * e.printStackTrace have changed to logger to prints standard output (STD OUT) . * add programmatic example . * Delete mvnw * mvnw.cmd deleted . * added mvnw from master * AddUnitTest * Add language to readme.md Co-authored-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com> Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com> Co-authored-by: Subhrodip Mohanta <subhromo@cisco.com> Co-authored-by: Subhrodip Mohanta <contact@subho.xyz>
2021-10-16 10:08:53 -07:00
@startuml
Main - Bank : use
class Main{
+ main(args : String[]) : void
}
class Bank{
- accounts : int[]
+ Bank (accountNum : int , baseAccount : int)
+ transfer(accountA : int , accountB : int , amount : int) : void {synchronized}
- getBalance() : void {synchronized}
}
@enduml