@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 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 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