-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathUMLDiagram.plantuml
57 lines (50 loc) · 1.55 KB
/
UMLDiagram.plantuml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
@startuml Crypto Mining App
class CryptoMiningApp {
+ run(): void
+ {static} main(args: String[]): void
}
class APIAccessor {
- price: BitcoinPrice
+ APIAccessor()
+ retrieveData(inputUrl: String): BitcoinPrice
}
class BitcoinMiner {
- name: String
- dailyBitcoinOutput: double
- wattage: int
- hourlyEfficiency: double[]
+ BitcoinMiner(name: String, hourlyBitcoinOutput: double, wattage: int)
+ getName(): String
+ getDailyBitcoinOutput(): double
+ getWattage(): int
+ getHourlyEfficiency(): double[]
+ setHourlyEfficiency(hour: int, hourlyEfficiency: double): void
}
class BitcoinPrice {
- time: JsonObject
- disclaimer: String
- chartName: String
- bpi: JsonObject
+ BitcoinPrice(time: JsonObject, disclaimer: String, chartName: String, bpi: JsonObject)
+ getTime(): JsonObject
+ getDisclaimer(): String
+ getChartName(): String
+ getBPI(): JsonObject
+ getRate(currency: String): double
}
class MiningCalculator {
- filename: String
- bitcoinAmt: double
- miners: ArrayList<BitcoinMiner>
- energyRates: double[]
+ MiningCalculator(filename: String, bitcoinAmt: double)
+ getMiners(): ArrayList<BitcoinMiner>
+ extractMinerData(): void
- extractEnergyRatesData(energyRatesFilename: String): void
+ calculateIndividualMiningTime(): double[]
+ calculateCollectiveMiningTime(): double
+ calculateHourlyEfficiency(energyRatesFilename: String): void
}
APIAccessor --> BitcoinPrice: uses
MiningCalculator --> BitcoinMiner: uses
@enduml