forked from Syntax-Error/TradeSim
Added a very basic class diagram
This commit is contained in:
parent
3fff76d40d
commit
1c02e03be9
2 changed files with 72 additions and 0 deletions
BIN
docs/class-diagram.png
Normal file
BIN
docs/class-diagram.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 50 KiB |
72
docs/dev.org
Normal file
72
docs/dev.org
Normal file
|
@ -0,0 +1,72 @@
|
|||
#+TITLE: Fejlesztői Dokumentáció
|
||||
|
||||
* TODO Követelmények
|
||||
* TODO Use-cas-ek
|
||||
* TODO Struktúrális leírás
|
||||
** Osztály diagram
|
||||
|
||||
#+BEGIN_SRC plantuml :file class-diagram.png :exports result
|
||||
@startuml
|
||||
Exchange <|--- Binance
|
||||
Market <--- "-currencies" Currency : 2
|
||||
Exchange *--- " #markets" Market : 1..*
|
||||
Trader <--- "-exchanges" Exchange: 1..*
|
||||
TradeTracker *--- "-traders" Trader: 0..*
|
||||
|
||||
class TradeTracker {
|
||||
-round()
|
||||
+start()
|
||||
}
|
||||
|
||||
abstract class Trader {
|
||||
+{abstract} step()
|
||||
}
|
||||
|
||||
note right of Trader::step()
|
||||
Itt történik a trader belső logikája
|
||||
end note
|
||||
|
||||
abstract class Exchange {
|
||||
-String name
|
||||
+getName(): String
|
||||
+{abstract} updateAllMarkets()
|
||||
+{abstract} updateMarket(id: int)
|
||||
+{abstract} updateMarket(name : String)
|
||||
+getMarket(id: int): Market
|
||||
+getMarket(name: String): Market
|
||||
+{abstract} addMarket(m: Market)
|
||||
}
|
||||
|
||||
class Binance {
|
||||
-{static} String baseURL
|
||||
+updateMarket(id: int)
|
||||
+updateMarket(name : String)
|
||||
+updateMarkets()
|
||||
}
|
||||
|
||||
note left of Binance
|
||||
Ez csak egy példa, lehetne akár más is
|
||||
end note
|
||||
|
||||
class Market {
|
||||
-String name
|
||||
-double exchange_rate
|
||||
+Market(primary: Currency,secondary: Currency)
|
||||
+getName(): String
|
||||
+getExchangeRate(): double
|
||||
+setExchangeRate(d: double)
|
||||
}
|
||||
|
||||
class Currency {
|
||||
-String name
|
||||
-String symbol
|
||||
+Currency(name: String,symbol: String)
|
||||
+getName() : String
|
||||
+getSymbol() : String
|
||||
}
|
||||
@enduml
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
[[file:class-diagram.png]]
|
||||
* TODO Viselkedés leírása
|
Loading…
Reference in a new issue