Added PUML graphic
This commit is contained in:
parent
2678312152
commit
781f66188d
1 changed files with 78 additions and 0 deletions
78
scratch.puml
Normal file
78
scratch.puml
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
@startuml
|
||||
hide empty methods
|
||||
|
||||
class Product {
|
||||
+char Separator [const]
|
||||
+string Invalid [const]
|
||||
+string ProductName [readonly]
|
||||
+string BarCode [readonly]
|
||||
+string BarCode [readonly]
|
||||
+{abstract} string[] CsvColumnNames
|
||||
+{abstract}string[] CsvColumnValues
|
||||
|
||||
+Product(string, string, int)
|
||||
+string GetCsvHeader()
|
||||
+string ToCsv()
|
||||
+{static} string ToCsvLine(string[], char)
|
||||
+{static} bool IsBarcodeValid()
|
||||
+{static} T[] AppendToArray(T[], T)
|
||||
}
|
||||
|
||||
class Food extends Product {
|
||||
-char AllergenSeparator [const]
|
||||
-SortedSet<AllergenType> Allergens [readonly]
|
||||
+AllergenType[] Allergens
|
||||
|
||||
+Food(string, string, int, AllergenType[])
|
||||
+string[] CsvColumnNames [override]
|
||||
+string[] CsvColumnValues [override]
|
||||
+bool AddAllergen(AllergenType
|
||||
+bool RemoveAllergen(AllergenType)
|
||||
+bool ContainsAnyAllergen(AllergenType[])
|
||||
}
|
||||
|
||||
class NonFood extends Product {
|
||||
-List<Review> Reviews [readonly]
|
||||
+Review[] Reviews
|
||||
+double? AverageRating
|
||||
+string[] CsvColumnNames [override]
|
||||
+string[] CsvColumnValues [override]
|
||||
|
||||
+NonFood(string, string, int)
|
||||
+AddReview(Review)
|
||||
}
|
||||
|
||||
class Review {
|
||||
-DateTime Date [readonly]
|
||||
-Rating Rating [readonly]
|
||||
-string Comment [readonly]
|
||||
+Review(DateTime, Rating, string)
|
||||
}
|
||||
|
||||
enum Rating {
|
||||
OneStar
|
||||
TwoStars
|
||||
ThreeStars
|
||||
FourStars
|
||||
FiveStars
|
||||
}
|
||||
|
||||
enum AllergenType {
|
||||
A
|
||||
B
|
||||
C
|
||||
D
|
||||
E
|
||||
F
|
||||
G
|
||||
H
|
||||
L
|
||||
M
|
||||
N
|
||||
O
|
||||
P
|
||||
R
|
||||
}
|
||||
|
||||
NonFood -> Review
|
||||
@enduml
|
||||
Loading…
Add table
Add a link
Reference in a new issue