2025-10-30 14:58:45 -04:00
|
|
|
digraph InventoryMClassDiagram {
|
2025-10-28 11:43:15 -04:00
|
|
|
rankdir=TB;
|
2025-10-30 14:58:45 -04:00
|
|
|
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}", 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];
|
|
|
|
|
|
|
|
|
|
// 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}"];
|
|
|
|
|
|
2025-10-29 13:14:10 -04:00
|
|
|
// Transaction
|
2025-10-30 14:58:45 -04:00
|
|
|
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}"];
|
2025-10-29 13:14:10 -04:00
|
|
|
|
2025-10-30 14:58:45 -04:00
|
|
|
// 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}"];
|
2025-10-29 13:14:10 -04:00
|
|
|
|
|
|
|
|
// Manager Classes (Singletons)
|
2025-10-30 14:58:45 -04:00
|
|
|
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}"];
|
2025-10-29 13:14:10 -04:00
|
|
|
|
|
|
|
|
// Repository
|
2025-10-30 14:58:45 -04:00
|
|
|
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 ];
|
2025-10-29 13:14:10 -04:00
|
|
|
|
2025-10-30 14:58:45 -04:00
|
|
|
// 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];
|
2025-10-29 13:14:10 -04:00
|
|
|
|
|
|
|
|
// Inheritance Relationships
|
2025-10-28 11:43:15 -04:00
|
|
|
Drawing -> InventoryPiece [arrowhead=empty, label="extends"];
|
|
|
|
|
Painting -> InventoryPiece [arrowhead=empty, label="extends"];
|
|
|
|
|
Print -> InventoryPiece [arrowhead=empty, label="extends"];
|
|
|
|
|
Sculpture -> InventoryPiece [arrowhead=empty, label="extends"];
|
2025-10-30 14:58:45 -04:00
|
|
|
|
|
|
|
|
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"];
|
|
|
|
|
|
2025-10-29 13:14:10 -04:00
|
|
|
InventoryManager -> InventoryList [arrowhead=diamond, label="INVENTORY"];
|
|
|
|
|
CustomerManager -> CustomerList [arrowhead=diamond, label="CUSTOMERS"];
|
|
|
|
|
TransactionManager -> TransactionList [arrowhead=diamond, label="TRANSACTIONS"];
|
|
|
|
|
|
2025-10-30 14:58:45 -04:00
|
|
|
InventoryList -> InventoryPiece [arrowhead=odiamond, label="contains 0..* "];
|
|
|
|
|
CustomerList -> Customer [arrowhead=odiamond, label="contains 0..* "];
|
|
|
|
|
TransactionList -> Transaction [arrowhead=odiamond, label="contains 0..* "];
|
|
|
|
|
|
|
|
|
|
// 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"];
|
2025-10-29 13:14:10 -04:00
|
|
|
|
2025-10-30 14:58:45 -04:00
|
|
|
Customer -> DataRepository [arrowhead=vee, style=dashed, label="uses"];
|
|
|
|
|
InventoryPiece -> DataRepository [arrowhead=vee, style=dashed, label="uses"];
|
|
|
|
|
Transaction -> DataRepository [arrowhead=vee, style=dashed, label="uses"];
|
2025-10-29 13:14:10 -04:00
|
|
|
|
2025-10-30 14:58:45 -04:00
|
|
|
TransactionManager -> Customer [arrowhead=vee, style=dashed, label="uses"];
|
|
|
|
|
TransactionManager -> InventoryList [arrowhead=vee, style=dashed, label="uses"];
|
2025-10-29 13:14:10 -04:00
|
|
|
|
2025-10-30 14:58:45 -04:00
|
|
|
// 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"];
|
2025-10-29 13:14:10 -04:00
|
|
|
}
|