-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathuml.puml
80 lines (68 loc) · 2.04 KB
/
uml.puml
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
@startuml
package "sutaj.worttrainer" {
class Main {
+main(String[] args)
}
class WortTrainer {
- List<WordBildPaar> availablePairs
- Set<WordBildPaar> selectedPairs
- WordBildPaar currentPair
- Statistik statistics
- Random random
+ WortTrainer(List<WordBildPaar> pairs)
+ void selectPairByIndex(int index)
+ void selectRandomPair()
+ WordBildPaar getCurrentPair()
+ Statistik getStatistics()
+ void submitAnswer(String answer)
+ List<WordBildPaar> getAvailablePairs()
+ void setAvailablePairs(List<WordBildPaar> pairs)
}
class WordBildPaar {
- String word
- String imageUrl
+ WordBildPaar(String word, String imageUrl)
+ String getWord()
+ String getImageUrl()
+ boolean equals(Object o)
+ int hashCode()
}
class Statistik {
- int total
- int correct
- int incorrect
+ Statistik()
+ void incrementTotal()
+ void incrementCorrect()
+ void incrementIncorrect()
+ int getTotal()
+ int getCorrect()
+ int getIncorrect()
+ void setTotal(int total)
+ void setCorrect(int correct)
+ void setIncorrect(int incorrect)
}
class PersistenceManager {
- String filePath
+ PersistenceManager(String filePath)
+ void save(WortTrainer trainer) throws IOException
+ WortTrainer load() throws IOException
}
class ImageUtils {
+ static ImageIcon getScaledImageIcon(String urlString, int maxWidth, int maxHeight)
+ static ImageIcon getScaledImageIcon(ImageIcon icon, int maxWidth, int maxHeight)
}
class JSONSave {
}
class XMLSave {
}
' Beziehungen
Main ..> WortTrainer
Main ..> ImageUtils
WortTrainer "1" o-- "0..*" WordBildPaar : enthält
WortTrainer "1" *-- "1" Statistik
Main ..> PersistenceManager
PersistenceManager ..> JSONSave
PersistenceManager ..> XMLSave
}
@enduml