diff --git a/uml/classdiagram.dot b/uml/classdiagram.dot index 2bc7439..fa28e1d 100644 --- a/uml/classdiagram.dot +++ b/uml/classdiagram.dot @@ -1,90 +1,84 @@ -digraph InventoryManagementSystem { +digraph InventoryMClassDiagram { rankdir=TB; - node [shape=record, fontname=Arial, fontsize=10]; - edge [fontname=Arial, fontsize=9]; - - // Abstract and Base Classes - InventoryPiece [label="{InventoryPiece\n(abstract)|+ id: String\n+ price: float\n+ created: ZonedDateTime\n+ title: String\n+ description: String\n+ Author: String\n- iventoryType: InventoryType|+ getId(): String\n+ setId(String): void\n+ getPrice(): float\n+ setPrice(float): void\n+ getCreated(): ZonedDateTime\n+ setCreated(ZonedDateTime): void\n+ getTitle(): String\n+ setTitle(String): void\n+ getDescription(): String\n+ setDescription(String): void\n+ getAuthor(): String\n+ setAuthor(String): void\n+ isArt(InventoryPiece): Boolean\n+ getType(): String}", style=filled, fillcolor=lightblue]; - - // Concrete Inventory Classes - Drawing [label="{Drawing|+ style: String\n+ technique: String\n+ category: String|+ Drawing()}", style=filled, fillcolor=lightgreen]; + node [shape=record, style=filled, fillcolor=lightblue]; - Painting [label="{Painting|+ height: int\n+ width: int\n+ style: String\n+ technique: String\n+ category: String|+ Painting()}", style=filled, fillcolor=lightgreen]; + // Abstract Classes + InventoryPiece [label="{InventoryPiece\n«abstract»|+ id : String\l+ price : float\l+ created : ZonedDateTime\l+ title : String\l+ description : String\l+ Author : String\l|+ getType() : String\l+ computePrice() : float\l}", fillcolor=lightyellow]; - Print [label="{Print|+ openEditionType: String\n+ category: String|+ Print()\n+ Print(String, String)\n+ getOpenEditionType(): String\n+ setOpenEditionType(String): void\n+ getCategory(): String\n+ setCategory(String): void}", style=filled, fillcolor=lightgreen]; + // Concrete Classes - Inventory Items + Drawing [label="{Drawing|+ style : String\l+ technique : String\l+ category : String\l|+ computePrice() : float\l}", fillcolor=lightyellow]; + Painting [label="{Painting|- height : int\l- width : int\l- style : String\l- technique : String\l- category : String\l|+ computePrice() : float\l}", fillcolor=lightyellow]; + Print [label="{Print|- openEditionType : String\l- category : String\l|+ computePrice() : float\l}", fillcolor=lightyellow]; + Sculpture [label="{Sculpture|- material : String\l- weight : float\l|+ computePrice() : float\l}", fillcolor=lightyellow]; - Sculpture [label="{Sculpture|+ material: String\n+ weight: float|+ Sculpture()}", style=filled, fillcolor=lightgreen]; - - // Enums - InventoryType [label="{\\<\\\\>\nInventoryType|PAINTING\nDRAWING\nPRINT\nSCULPTURE}", style=filled, fillcolor=lightyellow]; + // Customer and Address + Customer [label="{Customer|# id : String\l# updated : ZonedDateTime\l- phone : String\l- mailing : Address\l- email : String\l- nameFirst : String\l- nameLast : String\l|+ Customer(nameFirst, nameLast, phone, email)\l+ getId() : String\l+ getEmail() : String\l}"]; + Address [label="{Address|- street : String\l- city : String\l- state : String\l- zip : String\l|+ Address(street, city, state, zip)\l+ toString() : String\l+ equals(Object) : boolean\l+ hashCode() : int\l}"]; - TransactionOperationEnum [label="{\\<\\\\>\nTransactionOperationEnum|Completed\nDraft\nPricing\nRemoved\nShipping}", style=filled, fillcolor=lightyellow]; - - // Customer Related Classes - Customer [label="{Customer|# id: String\n# updated: ZonedDateTime\n- phone: String\n- mailing: Address\n- email: String\n- nameFirst: String\n- nameLast: String|+ Customer()\n+ Customer(String, String, String, String)\n+ getEmail(): String\n+ getId(): String\n+ setId(String): void\n+ getPhone(): String\n+ setPhone(String): void\n+ getMailing(): Address\n+ setMailing(Address): void\n+ setEmail(String): void\n+ getNameFirst(): String\n+ setNameFirst(String): void\n+ getNameLast(): String\n+ setNameLast(String): void}", style=filled, fillcolor=lightcyan]; - - Address [label="{Address|- street: String\n- city: String\n- state: String\n- zip: String|+ Address()\n+ Address(String, String, String, String)\n+ getStreet(): String\n+ setStreet(String): void\n+ getCity(): String\n+ setCity(String): void\n+ getState(): String\n+ setState(String): void\n+ getZip(): String\n+ setZip(String): void\n+ hashCode(): int\n+ equals(Object): boolean\n+ toString(): String}", style=filled, fillcolor=white]; - // Transaction - Transaction [label="{Transaction|- id: String\n- created: ZonedDateTime\n- completed: ZonedDateTime\n- customerId: String\n- shipToAddress: Address\n- customerInventoryList: InventoryList\n- attributes: JsonArray|+ Transaction()\n+ getId(): String\n+ setId(String): void\n+ getCreated(): ZonedDateTime\n+ setCreated(ZonedDateTime): void\n+ getCompleted(): ZonedDateTime\n+ setCompleted(ZonedDateTime): void}", style=filled, fillcolor=lightcyan]; - - // List Classes (Collections) - InventoryList [label="{InventoryList|\\\\>|+ InventoryList()}", style=filled, fillcolor=wheat]; + Transaction [label="{Transaction|- id : String\l- created : ZonedDateTime\l- completed : ZonedDateTime\l- customerId : String\l- shipToAddress : Address\l- customerInventoryList : InventoryList\l- totalPrice : float\l- attributes : JsonArray\l|# Transaction(customer, cart)\l+ check() : void\l+ toString() : String\l}"]; - CustomerList [label="{CustomerList|\\\\>|+ CustomerList()}", style=filled, fillcolor=wheat]; + // List Classes + InventoryList [label="{InventoryList|+ InventoryList()\l+ add(InventoryPiece) : boolean\l}"]; + CustomerList [label="{CustomerList|+ CustomerList()\l}"]; + TransactionList [label="{TransactionList|+ TransactionList()\l+ add(Transaction) : boolean\l}"]; - TransactionList [label="{TransactionList|\\\\>|+ TransactionList()\n+ add(Transaction): boolean}", style=filled, fillcolor=wheat]; - // Manager Classes (Singletons) - InventoryManager [label="{InventoryManager|+ INVENTORY: InventoryList\n- INSTANCE: InventoryManager|+ getInstance(): InventoryManager\n+ getArtPieceTypes(): Set\\\n+ add(InventoryPiece): void\n+ find(String): InventoryPiece\n+ update(InventoryPiece): InventoryPiece\n+ save(): void\n+ loadAll(): void\n+ Remove(InventoryPiece): void}", style=filled, fillcolor=lightpink]; + InventoryManager [label="{InventoryManager|+ INVENTORY : InventoryList\l- INSTANCE : InventoryManager\l|+ getInstance() : InventoryManager\l+ add(InventoryPiece) : void\l+ find(String) : InventoryPiece\l+ Remove(InventoryPiece) : InventoryPiece\l+ save() : void\l+ load() : void\l}"]; + CustomerManager [label="{CustomerManager|+ CUSTOMERS : CustomerList\l- INSTANCE : CustomerManager\l|+ getInstance() : CustomerManager\l+ add(Customer) : boolean\l+ findByEmail(String) : Customer\l+ save() : void\l+ load() : void\l}"]; + TransactionManager [label="{TransactionManager|+ TRANSACTIONS : TransactionList\l- INSTANCE : TransactionManager\l|+ getInstance() : TransactionManager\l+ TransactRequest(Customer, InventoryList) : Transaction\l+ complete(Transaction) : void\l+ compute(Transaction) : void\l+ save() : void\l+ load() : void\l}"]; - CustomerManager [label="{CustomerManager|+ CUSTOMERS: CustomerList\n- INSTANCE: CustomerManager|+ getInstance(): CustomerManager\n+ add(Customer): boolean\n- check(Customer): void\n+ findById(String): Customer\n+ findByEmail(String): Customer}", style=filled, fillcolor=lightpink]; - - TransactionManager [label="{TransactionManager|+ TRANSACTIONS: TransactionList\n- INSTANCE: TransactionManager|+ getInstance(): TransactionManager\n+ TransactRequest(Customer, InventoryList, Transaction): Transaction\n+ compute(Transaction, TransactionOperationEnum): void\n+ compute(Transaction): void\n+ complete(Transaction): void\n+ findByCustomerEmail(String): TransactionList\n+ findByTransactionId(String): TransactionList\n+ findByTransactionDate(ZonedDateTime): TransactionList\n+ remove(Transaction): void\n+ save(): void}", style=filled, fillcolor=lightpink]; - // Repository - DataRepository [label="{DataRepository|+ INSTANCE: DataRepository|+ getInstance(): DataRepository\n+ generateRandomID(int): String\n+ generateRandom10DigitID(): String\n+ WalkFileSystemTree(InventoryManager): void\n+ WalkFileSystemTree(CustomerManager): void\n+ WalkFileSystemTree(TransactionManager): void\n- serialize_deserialize(): void\n+ mapJsonToObjectList(String, Class\\): List\\}", style=filled, fillcolor=orange]; - + DataRepository [label="{DataRepository|- INSTANCE : DataRepository\l|+ getInstance() : DataRepository\l+ generateRandomID(int) : String\l+ generateRandom10DigitID() : String\l+ write(InventoryManager) : void\l+ write(CustomerManager) : void\l+ write(TransactionManager) : void\l+ WalkFileSystemTree(...) : void\l}" , fillcolor=lightyellow ]; + // Exception Classes - InvalidArtOperationException [label="{InvalidArtOperationException|\\|+ InvalidArtOperationException(String)\n+ InvalidArtOperationException(String, Throwable)\n+ InvalidArtOperationException(Throwable)}", style=filled, fillcolor=tomato]; + InvalidArtOperationException [label="{InvalidArtOperationException|+ InvalidArtOperationException(String)\l}", fillcolor=lightcoral]; + InvalidRecordDataException [label="{InvalidRecordDataException|+ InvalidRecordDataException(String)\l}", fillcolor=lightcoral]; + InvalidTransactionException [label="{InvalidTransactionException|+ InvalidTransactionException(String)\l}", fillcolor=lightcoral]; + InvalidTransOperationException [label="{InvalidTransOperationException|+ InvalidTransOperationException(String)\l}", fillcolor=lightcoral]; - InvalidRecordDataException [label="{InvalidRecordDataException|\\|+ InvalidRecordDataException(String)\n+ InvalidRecordDataException(String, Throwable)\n+ InvalidRecordDataException(Throwable)}", style=filled, fillcolor=tomato]; - - InvalidTransactionException [label="{InvalidTransactionException|\\|+ InvalidTransactionException(String)\n+ InvalidTransactionException(String, Throwable)\n+ InvalidTransactionException(Throwable)}", style=filled, fillcolor=tomato]; - - InvalidTransOperationException [label="{InvalidTransOperationException|\\|+ InvalidTransOperationException(String)\n+ InvalidTransOperationException(String, Throwable)\n+ InvalidTransOperationException(Throwable)}", style=filled, fillcolor=tomato]; - // Inheritance Relationships Drawing -> InventoryPiece [arrowhead=empty, label="extends"]; Painting -> InventoryPiece [arrowhead=empty, label="extends"]; Print -> InventoryPiece [arrowhead=empty, label="extends"]; Sculpture -> InventoryPiece [arrowhead=empty, label="extends"]; - - // Associations - InventoryPiece -> InventoryType [arrowhead=open, style=dashed, label="uses"]; - Customer -> Address [arrowhead=diamond, label="has"]; - Transaction -> Address [arrowhead=open, label="shipToAddress"]; - Transaction -> InventoryList [arrowhead=open, label="customerInventoryList"]; - // Manager to List relationships + InventoryList -> ArrayList [arrowhead=empty, label="extends", style=dashed]; + CustomerList -> ArrayList [arrowhead=empty, label="extends", style=dashed]; + TransactionList -> ArrayList [arrowhead=empty, label="extends", style=dashed]; + + InvalidArtOperationException -> RuntimeException [arrowhead=empty, label="extends", style=dashed]; + InvalidRecordDataException -> RuntimeException [arrowhead=empty, label="extends", style=dashed]; + InvalidTransactionException -> RuntimeException [arrowhead=empty, label="extends", style=dashed]; + InvalidTransOperationException -> RuntimeException [arrowhead=empty, label="extends", style=dashed]; + + // Composition/Aggregation Relationships + Customer -> Address [arrowhead=diamond, label="mailing"]; + Transaction -> Address [arrowhead=diamond, label="shipToAddress"]; + Transaction -> InventoryList [arrowhead=diamond, label="customerInventoryList"]; + Transaction -> Customer [arrowhead=none, style=dashed, label="customerId"]; + InventoryManager -> InventoryList [arrowhead=diamond, label="INVENTORY"]; CustomerManager -> CustomerList [arrowhead=diamond, label="CUSTOMERS"]; TransactionManager -> TransactionList [arrowhead=diamond, label="TRANSACTIONS"]; - // List contains relationships - InventoryList -> InventoryPiece [arrowhead=odiamond, style=dashed, label="contains 0..*"]; - CustomerList -> Customer [arrowhead=odiamond, style=dashed, label="contains 0..*"]; - TransactionList -> Transaction [arrowhead=diamond, style=dashed, label="contains"]; + InventoryList -> InventoryPiece [arrowhead=odiamond, label="contains 0..* "]; + CustomerList -> Customer [arrowhead=odiamond, label="contains 0..* "]; + TransactionList -> Transaction [arrowhead=odiamond, label="contains 0..* "]; - // Manager relationships - DataRepository -> InventoryManager [arrowhead=open, style=dashed, label="uses"]; - DataRepository -> CustomerManager [arrowhead=open, style=dashed, label="uses"]; - DataRepository -> TransactionManager [arrowhead=open, style=dashed, label="uses"]; + // Dependencies + InventoryManager -> DataRepository [arrowhead=vee, style=dashed, label="uses"]; + CustomerManager -> DataRepository [arrowhead=vee, style=dashed, label="uses"]; + TransactionManager -> DataRepository [arrowhead=vee, style=dashed, label="uses"]; - TransactionManager -> TransactionOperationEnum [arrowhead=open, style=dashed, label="uses"]; - CustomerManager -> InvalidRecordDataException [arrowhead=open, style=dashed, label="throws"]; + Customer -> DataRepository [arrowhead=vee, style=dashed, label="uses"]; + InventoryPiece -> DataRepository [arrowhead=vee, style=dashed, label="uses"]; + Transaction -> DataRepository [arrowhead=vee, style=dashed, label="uses"]; - // Transaction relationships - TransactionManager -> Customer [arrowhead=open, style=dashed, label="uses"]; - TransactionManager -> InventoryList [arrowhead=open, style=dashed, label="uses"]; + TransactionManager -> Customer [arrowhead=vee, style=dashed, label="uses"]; + TransactionManager -> InventoryList [arrowhead=vee, style=dashed, label="uses"]; + + // External Classes (referenced but not defined) + ArrayList [label="{ArrayList\n«Java Util»}", fillcolor=lightgray, style="filled,dashed"]; + RuntimeException [label="{RuntimeException\n«Java Lang»}", fillcolor=lightgray, style="filled,dashed"]; } \ No newline at end of file diff --git a/uml/classdiagram.png b/uml/classdiagram.png index 2668d6f..a3dc005 100644 Binary files a/uml/classdiagram.png and b/uml/classdiagram.png differ diff --git a/uml/classdiagram.svg b/uml/classdiagram.svg index 97aa79f..40fb0f5 100644 --- a/uml/classdiagram.svg +++ b/uml/classdiagram.svg @@ -1,29 +1,29 @@ - + - -InventoryPiece -«abstract» - -+ id : String -+ price : float -+ created : ZonedDateTime -+ title : String -+ description : String -+ Author : String - -+ getType() : String -+ computePrice() : float + +InventoryPiece +«abstract» + ++ id : String ++ price : float ++ created : ZonedDateTime ++ title : String ++ description : String ++ Author : String + ++ getType() : String ++ computePrice() : float - + DataRepository - INSTANCE : DataRepository @@ -39,14 +39,14 @@ - - -uses + + +uses - + Drawing + style : String @@ -58,14 +58,14 @@ - - -extends + + +extends - + Painting - height : int @@ -79,14 +79,14 @@ - - -extends + + +extends - + Print - openEditionType : String @@ -97,14 +97,14 @@ - - -extends + + +extends - + Sculpture - material : String @@ -115,9 +115,9 @@ - - -extends + + +extends @@ -140,32 +140,32 @@ - -Address - -- street : String -- city : String -- state : String -- zip : String - -+ Address(street, city, state, zip) -+ toString() : String -+ equals(Object) : boolean -+ hashCode() : int + +Address + +- street : String +- city : String +- state : String +- zip : String + ++ Address(street, city, state, zip) ++ toString() : String ++ equals(Object) : boolean ++ hashCode() : int - - -mailing + + +mailing - - -uses + + +uses @@ -195,9 +195,9 @@ - - -shipToAddress + + +shipToAddress @@ -218,16 +218,16 @@ - - -uses + + +uses - - -contains + + +contains 0..* @@ -256,7 +256,7 @@ -contains +contains 0..* @@ -277,16 +277,16 @@ - - -contains + + +contains 0..* - - -extends + + +extends diff --git a/uml/classdiagram2.dot b/uml/classdiagram2.dot deleted file mode 100644 index 22dc860..0000000 --- a/uml/classdiagram2.dot +++ /dev/null @@ -1,84 +0,0 @@ -digraph InventorySystem { - // Graph settings - rankdir=TB; - node [shape=record, fontname="Arial", fontsize=10]; - edge [fontname="Arial", fontsize=9]; - - // Abstract Class - InventoryPiece [label="{InventoryPiece\n«abstract»|+ id : String\l+ price : float\l+ created : ZonedDateTime\l+ title : String\l+ description : String\l+ Author : String\l- iventoryType : InventoryType\l|+ InventoryPiece(InventoryType)\l+ InventoryPiece()\l+ isArt(InventoryPiece) : Boolean\l+ getType() : String\l+ getId() : String\l+ setId(String) : void\l+ getPrice() : float\l+ setPrice(float) : void\l+ getCreated() : ZonedDateTime\l+ setCreated(ZonedDateTime) : void\l+ getTitle() : String\l+ setTitle(String) : void\l+ getDescription() : String\l+ setDescription(String) : void\l+ getAuthor() : String\l+ setAuthor(String) : void\l}", style=filled, fillcolor=lightyellow]; - - // Concrete Classes extending InventoryPiece - Drawing [label="{Drawing|+ style : String\l+ technique : String\l+ category : String\l|+ Drawing()\l}"]; - Painting [label="{Painting|- height : int\l- width : int\l- style : String\l- technique : String\l- category : String\l|+ Painting()\l}"]; - Print [label="{Print|- openEditionType : String\l- category : String\l|+ Print()\l+ Print(String, String)\l+ getOpenEditionType() : String\l+ setOpenEditionType(String) : void\l+ getCategory() : String\l+ setCategory(String) : void\l}"]; - Sculpture [label="{Sculpture|- material : String\l- weight : float\l|+ Sculpture()\l}"]; - - // Enums - InventoryType [label="{«enumeration»\nInventoryType|PAINTING\lDRAWING\lPRINT\lSCULPTURE\l}", style=filled, fillcolor=lightblue]; - TransactionOperationEnum [label="{«enumeration»\nTransactionOperationEnum|Completed\lDraft\lPricing\lRemoved\lShipping\l}", style=filled, fillcolor=lightblue]; - - // Value Objects - Address [label="{Address|- street : String\l- city : String\l- state : String\l- zip : String\l|+ Address()\l+ Address(String, String, String, String)\l+ getStreet() : String\l+ setStreet(String) : void\l+ getCity() : String\l+ setCity(String) : void\l+ getState() : String\l+ setState(String) : void\l+ getZip() : String\l+ setZip(String) : void\l+ hashCode() : int\l+ equals(Object) : boolean\l+ toString() : String\l}"]; - - // Domain Classes - Customer [label="{Customer|# id : String\l# updated : ZonedDateTime\l- phone : String\l- mailing : Address\l- email : String\l- nameFirst : String\l- nameLast : String\l|+ Customer(String, String, String, String)\l+ Customer()\l+ getEmail() : String\l+ getId() : String\l+ setId(String) : void\l+ getPhone() : String\l+ setPhone(String) : void\l+ getMailing() : Address\l+ setMailing(Address) : void\l+ setEmail(String) : void\l+ getNameFirst() : String\l+ setNameFirst(String) : void\l+ getNameLast() : String\l+ setNameLast(String) : void\l}"]; - - Transaction [label="{Transaction|- id : String\l- created : ZonedDateTime\l- completed : ZonedDateTime\l- customerId : String\l- shipToAddress : Address\l- customerInventoryList : InventoryList\l- attributes : JsonArray\l|+ Transaction()\l+ getId() : String\l+ setId(String) : void\l+ getCreated() : ZonedDateTime\l+ setCreated(ZonedDateTime) : void\l+ getCompleted() : ZonedDateTime\l+ setCompleted(ZonedDateTime) : void\l}"]; - - // Collection Classes - InventoryList [label="{InventoryList|+ InventoryList()\l}", style=filled, fillcolor=lightgreen]; - CustomerList [label="{CustomerList|+ CustomerList()\l}", style=filled, fillcolor=lightgreen]; - TransactionList [label="{TransactionList|+ TransactionList()\l+ add(Transaction) : boolean\l}", style=filled, fillcolor=lightgreen]; - - // Manager Classes (Singletons) - InventoryManager [label="{«singleton»\nInventoryManager|- INSTANCE : InventoryManager\l+ INVENTORY : InventoryList\l|- InventoryManager()\l+ getInstance() : InventoryManager\l+ getArtPieceTypes() : Set\\l+ add(InventoryPiece) : void\l+ find(String) : InventoryPiece\l+ update(InventoryPiece) : InventoryPiece\l+ save() : void\l+ loadAll() : void\l+ Remove(InventoryPiece) : void\l}", style=filled, fillcolor=lightcoral]; - - CustomerManager [label="{«singleton»\nCustomerManager|- INSTANCE : CustomerManager\l+ CUSTOMERS : CustomerList\l|+ getInstance() : CustomerManager\l+ add(Customer) : boolean\l- check(Customer) : void\l+ findById(String) : Customer\l+ findByEmail(String) : Customer\l}", style=filled, fillcolor=lightcoral]; - - TransactionManager [label="{«singleton»\nTransactionManager|- INSTANCE : TransactionManager\l+ TRANSACTIONS : TransactionList\l|+ getInstance() : TransactionManager\l+ TransactRequest(Customer, InventoryList, Transaction) : Transaction\l+ compute(Transaction, TransactionOperationEnum) : void\l+ compute(Transaction) : void\l+ complete(Transaction) : void\l+ findByCustomerEmail(String) : TransactionList\l+ findByTransactionId(String) : TransactionList\l+ findByTransactionDate(ZonedDateTime) : TransactionList\l+ remove(Transaction) : void\l+ save() : void\l}", style=filled, fillcolor=lightcoral]; - - // Utility Class - DataRepository [label="{«singleton»\nDataRepository|- INSTANCE : DataRepository\l|+ getInstance() : DataRepository\l+ generateRandomID(int) : String\l+ generateRandom10DigitID() : String\l+ WalkFileSystemTree(InventoryManager) : void\l+ WalkFileSystemTree(CustomerManager) : void\l+ WalkFileSystemTree(TransactionManager) : void\l+ mapJsonToObjectList(String, Class\) : List\\l}", style=filled, fillcolor=lavender]; - - // Exception Classes - InvalidArtOperationException [label="{InvalidArtOperationException|+ InvalidArtOperationException(String)\l+ InvalidArtOperationException(String, Throwable)\l+ InvalidArtOperationException(Throwable)\l}", style=filled, fillcolor=pink]; - - InvalidRecordDataException [label="{InvalidRecordDataException|+ InvalidRecordDataException(String)\l+ InvalidRecordDataException(String, Throwable)\l+ InvalidRecordDataException(Throwable)\l}", style=filled, fillcolor=pink]; - - InvalidTransactionException [label="{InvalidTransactionException|+ InvalidTransactionException(String)\l+ InvalidTransactionException(String, Throwable)\l+ InvalidTransactionException(Throwable)\l}", style=filled, fillcolor=pink]; - - InvalidTransOperationException [label="{InvalidTransOperationException|+ InvalidTransOperationException(String)\l+ InvalidTransOperationException(String, Throwable)\l+ InvalidTransOperationException(Throwable)\l}", style=filled, fillcolor=pink]; - - // Inheritance relationships - InventoryPiece -> Drawing [dir=back, arrowtail=empty, label="extends"]; - InventoryPiece -> Painting [dir=back, arrowtail=empty, label="extends"]; - InventoryPiece -> Print [dir=back, arrowtail=empty, label="extends"]; - InventoryPiece -> Sculpture [dir=back, arrowtail=empty, label="extends"]; - - // Collection inheritance - InventoryList -> InventoryPiece [arrowhead=diamond, label="contains *"]; - CustomerList -> Customer [arrowhead=diamond, label="contains *"]; - TransactionList -> Transaction [arrowhead=diamond, label="contains *"]; - - // Composition relationships - Customer -> Address [arrowhead=diamond, label="mailing"]; - Transaction -> Address [arrowhead=diamond, label="shipToAddress"]; - Transaction -> InventoryList [arrowhead=diamond, label="customerInventoryList"]; - - // Manager aggregations - InventoryManager -> InventoryList [arrowhead=diamond, label="INVENTORY"]; - CustomerManager -> CustomerList [arrowhead=diamond, label="CUSTOMERS"]; - TransactionManager -> TransactionList [arrowhead=diamond, label="TRANSACTIONS"]; - - // Dependencies - InventoryPiece -> InventoryType [style=dashed, arrowhead=open, label="uses"]; - CustomerManager -> InvalidRecordDataException [style=dashed, arrowhead=open, label="throws"]; - TransactionManager -> TransactionOperationEnum [style=dashed, arrowhead=open, label="uses"]; - InventoryManager -> DataRepository [style=dashed, arrowhead=open, label="uses"]; - CustomerManager -> DataRepository [style=dashed, arrowhead=open, label="uses"]; - TransactionManager -> DataRepository [style=dashed, arrowhead=open, label="uses"]; - InventoryPiece -> DataRepository [style=dashed, arrowhead=open, label="uses"]; - TransactionManager -> Customer [style=dashed, arrowhead=open, label="uses"]; - TransactionManager -> InventoryList [style=dashed, arrowhead=open, label="uses"]; - DataRepository -> InventoryPiece [style=dashed, arrowhead=open, label="serializes"]; -} \ No newline at end of file diff --git a/uml/classdiagram3.dot b/uml/classdiagram3.dot deleted file mode 100644 index f683ef9..0000000 --- a/uml/classdiagram3.dot +++ /dev/null @@ -1,84 +0,0 @@ -digraph InventoryMClassDiagram { - rankdir=TB; - node [shape=record, style=filled, fillcolor=lightblue]; - - // Abstract Classes - InventoryPiece [label="{InventoryPiece\n«abstract»|+ id : String\l+ price : float\l+ created : ZonedDateTime\l+ title : String\l+ description : String\l+ Author : String\l|+ getType() : String\l+ computePrice() : float\l}", fillcolor=lightyellow]; - - // Concrete Classes - Inventory Items - Drawing [label="{Drawing|+ style : String\l+ technique : String\l+ category : String\l|+ computePrice() : float\l}"]; - Painting [label="{Painting|- height : int\l- width : int\l- style : String\l- technique : String\l- category : String\l|+ computePrice() : float\l}"]; - Print [label="{Print|- openEditionType : String\l- category : String\l|+ computePrice() : float\l}"]; - Sculpture [label="{Sculpture|- material : String\l- weight : float\l|+ computePrice() : float\l}"]; - - // Customer and Address - Customer [label="{Customer|# id : String\l# updated : ZonedDateTime\l- phone : String\l- mailing : Address\l- email : String\l- nameFirst : String\l- nameLast : String\l|+ Customer(nameFirst, nameLast, phone, email)\l+ getId() : String\l+ getEmail() : String\l}"]; - Address [label="{Address|- street : String\l- city : String\l- state : String\l- zip : String\l|+ Address(street, city, state, zip)\l+ toString() : String\l+ equals(Object) : boolean\l+ hashCode() : int\l}"]; - - // Transaction - Transaction [label="{Transaction|- id : String\l- created : ZonedDateTime\l- completed : ZonedDateTime\l- customerId : String\l- shipToAddress : Address\l- customerInventoryList : InventoryList\l- totalPrice : float\l- attributes : JsonArray\l|# Transaction(customer, cart)\l+ check() : void\l+ toString() : String\l}"]; - - // List Classes - InventoryList [label="{InventoryList|+ InventoryList()\l+ add(InventoryPiece) : boolean\l}"]; - CustomerList [label="{CustomerList|+ CustomerList()\l}"]; - TransactionList [label="{TransactionList|+ TransactionList()\l+ add(Transaction) : boolean\l}"]; - - // Manager Classes (Singletons) - InventoryManager [label="{InventoryManager|+ INVENTORY : InventoryList\l- INSTANCE : InventoryManager\l|+ getInstance() : InventoryManager\l+ add(InventoryPiece) : void\l+ find(String) : InventoryPiece\l+ Remove(InventoryPiece) : InventoryPiece\l+ save() : void\l+ load() : void\l}"]; - CustomerManager [label="{CustomerManager|+ CUSTOMERS : CustomerList\l- INSTANCE : CustomerManager\l|+ getInstance() : CustomerManager\l+ add(Customer) : boolean\l+ findByEmail(String) : Customer\l+ save() : void\l+ load() : void\l}"]; - TransactionManager [label="{TransactionManager|+ TRANSACTIONS : TransactionList\l- INSTANCE : TransactionManager\l|+ getInstance() : TransactionManager\l+ TransactRequest(Customer, InventoryList) : Transaction\l+ complete(Transaction) : void\l+ compute(Transaction) : void\l+ save() : void\l+ load() : void\l}"]; - - // Repository - DataRepository [label="{DataRepository|- INSTANCE : DataRepository\l|+ getInstance() : DataRepository\l+ generateRandomID(int) : String\l+ generateRandom10DigitID() : String\l+ write(InventoryManager) : void\l+ write(CustomerManager) : void\l+ write(TransactionManager) : void\l+ WalkFileSystemTree(...) : void\l}"]; - - // Exception Classes - InvalidArtOperationException [label="{InvalidArtOperationException|+ InvalidArtOperationException(String)\l}", fillcolor=lightcoral]; - InvalidRecordDataException [label="{InvalidRecordDataException|+ InvalidRecordDataException(String)\l}", fillcolor=lightcoral]; - InvalidTransactionException [label="{InvalidTransactionException|+ InvalidTransactionException(String)\l}", fillcolor=lightcoral]; - InvalidTransOperationException [label="{InvalidTransOperationException|+ InvalidTransOperationException(String)\l}", fillcolor=lightcoral]; - - // Inheritance Relationships - Drawing -> InventoryPiece [arrowhead=empty, label="extends"]; - Painting -> InventoryPiece [arrowhead=empty, label="extends"]; - Print -> InventoryPiece [arrowhead=empty, label="extends"]; - Sculpture -> InventoryPiece [arrowhead=empty, label="extends"]; - - InventoryList -> ArrayList [arrowhead=empty, label="extends", style=dashed]; - CustomerList -> ArrayList [arrowhead=empty, label="extends", style=dashed]; - TransactionList -> ArrayList [arrowhead=empty, label="extends", style=dashed]; - - InvalidArtOperationException -> RuntimeException [arrowhead=empty, label="extends", style=dashed]; - InvalidRecordDataException -> RuntimeException [arrowhead=empty, label="extends", style=dashed]; - InvalidTransactionException -> RuntimeException [arrowhead=empty, label="extends", style=dashed]; - InvalidTransOperationException -> RuntimeException [arrowhead=empty, label="extends", style=dashed]; - - // Composition/Aggregation Relationships - Customer -> Address [arrowhead=diamond, label="mailing"]; - Transaction -> Address [arrowhead=diamond, label="shipToAddress"]; - Transaction -> InventoryList [arrowhead=diamond, label="customerInventoryList"]; - Transaction -> Customer [arrowhead=none, style=dashed, label="customerId"]; - - InventoryManager -> InventoryList [arrowhead=diamond, label="INVENTORY"]; - CustomerManager -> CustomerList [arrowhead=diamond, label="CUSTOMERS"]; - TransactionManager -> TransactionList [arrowhead=diamond, label="TRANSACTIONS"]; - - InventoryList -> InventoryPiece [arrowhead=odiamond, label="contains"]; - CustomerList -> Customer [arrowhead=odiamond, label="contains"]; - TransactionList -> Transaction [arrowhead=odiamond, label="contains"]; - - // Dependencies - InventoryManager -> DataRepository [arrowhead=vee, style=dashed, label="uses"]; - CustomerManager -> DataRepository [arrowhead=vee, style=dashed, label="uses"]; - TransactionManager -> DataRepository [arrowhead=vee, style=dashed, label="uses"]; - - Customer -> DataRepository [arrowhead=vee, style=dashed, label="uses"]; - InventoryPiece -> DataRepository [arrowhead=vee, style=dashed, label="uses"]; - Transaction -> DataRepository [arrowhead=vee, style=dashed, label="uses"]; - - TransactionManager -> Customer [arrowhead=vee, style=dashed, label="uses"]; - TransactionManager -> InventoryList [arrowhead=vee, style=dashed, label="uses"]; - - // External Classes (referenced but not defined) - ArrayList [label="{ArrayList\n«Java Util»}", fillcolor=lightgray, style="filled,dashed"]; - RuntimeException [label="{RuntimeException\n«Java Lang»}", fillcolor=lightgray, style="filled,dashed"]; -} \ No newline at end of file