digraph InventoryManagementSystem { rankdir=TB; node [shape=record, fontname="Arial", fontsize=10]; edge [fontname="Arial", fontsize=9]; // Core Model Classes Address [label="{Address|+ street: String\l+ city: String\l+ state: String\l+ zip: 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}"]; 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+ getId(): String\l+ setId(String): void\l+ getPhone(): String\l+ setPhone(String): void\l+ getMailing(): Address\l+ setMailing(Address): void\l+ getEmail(): String\l+ setEmail(String): void\l+ getNameFirst(): String\l+ setNameFirst(String): void\l+ getNameLast(): String\l+ setNameLast(String): void\l}"]; InventoryPiece [label="{«abstract»\lInventoryPiece|+ id: String\l+ price: float\l+ created: ZonedDateTime\l+ title: String\l+ description: String\l+ Author: String\l|+ InventoryPiece()\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+ «abstract» computePrice(): float\l}"]; Drawing [label="{Drawing|+ style: String\l+ technique: String\l+ category: String\l|+ Drawing()\l+ computePrice(): float\l}"]; Painting [label="{Painting|- height: int\l- width: int\l- style: String\l- technique: String\l- category: String\l|+ Painting()\l+ Painting(int, int)\l+ getHeight(): int\l+ setHeight(int): void\l+ getWidth(): int\l+ setWidth(int): void\l+ getStyle(): String\l+ setStyle(String): void\l+ getTechnique(): String\l+ setTechnique(String): void\l+ getCategory(): String\l+ setCategory(String): void\l+ computePrice(): float\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+ computePrice(): float\l}"]; Sculpture [label="{Sculpture|- material: String\l- weight: float\l|+ Sculpture()\l+ Sculpture(float)\l+ getMaterial(): String\l+ setMaterial(String): void\l+ getWeight(): float\l+ setWeight(float): void\l+ computePrice(): float\l}"]; 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, InventoryList)\l# Transaction()\l+ getId(): String\l+ setId(String): void\l+ getCreated(): ZonedDateTime\l+ setCreated(ZonedDateTime): void\l+ getCompleted(): ZonedDateTime\l+ setCompleted(ZonedDateTime): void\l+ getCustomerId(): String\l+ setCustomerId(String): void\l+ getShipToAddress(): Address\l+ setShipToAddress(Address): void\l+ getCustomerInventoryList(): InventoryList\l+ setCustomerInventoryList(InventoryList): void\l+ getTotalPrice(): float\l+ setTotalPrice(float): void\l+ getAttributes(): JsonArray\l+ setAttributes(JsonArray): void\l+ toString(): String\l}"]; // Collection Classes CustomerList [label="{CustomerList|+ CustomerList()\l}"]; InventoryList [label="{InventoryList|+ InventoryList()\l+ add(InventoryPiece): boolean\l}"]; TransactionList [label="{TransactionList|+ TransactionList()\l+ add(Transaction): boolean\l}"]; // Manager Classes CustomerManager [label="{«singleton»\lCustomerManager|- 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+ save(): void\l+ load(): void\l}"]; InventoryManager [label="{«singleton»\lInventoryManager|- INSTANCE: InventoryManager\l+ INVENTORY: InventoryList\l|+ getInstance(): InventoryManager\l+ add(InventoryPiece): void\l+ find(String): InventoryPiece\l+ update(InventoryPiece): InventoryPiece\l+ Remove(InventoryPiece): InventoryPiece\l+ save(): void\l+ load(): void\l}"]; TransactionManager [label="{«singleton»\lTransactionManager|- INSTANCE: TransactionManager\l+ TRANSACTIONS: TransactionList\l|+ getInstance(): TransactionManager\l+ TransactRequest(Customer, InventoryList): Transaction\l+ complete(Transaction): void\l+ compute(Transaction): void\l+ findByCustomerEmail(String): TransactionList\l+ findByTransactionId(String): TransactionList\l+ findByTransactionDate(ZonedDateTime): TransactionList\l+ remove(Transaction): void\l+ save(): void\l}"]; DataRepository [label="{«singleton»\lDataRepository|- 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- write(CustomerManager): void\l- write(InventoryManager): void\l- read(CustomerManager, Path): void\l- read(InventoryManager, Path): void\l}"]; // Exception Classes InvalidArtOperationException [label="{«exception»\lInvalidArtOperationException|+ InvalidArtOperationException(String)\l+ InvalidArtOperationException(String, Throwable)\l+ InvalidArtOperationException(Throwable)\l}"]; InvalidRecordDataException [label="{«exception»\lInvalidRecordDataException|+ InvalidRecordDataException(String)\l+ InvalidRecordDataException(String, Throwable)\l+ InvalidRecordDataException(Throwable)\l}"]; InvalidTransactionException [label="{«exception»\lInvalidTransactionException|+ InvalidTransactionException(String)\l+ InvalidTransactionException(String, Throwable)\l+ InvalidTransactionException(Throwable)\l}"]; InvalidTransOperationException [label="{«exception»\lInvalidTransOperationException|+ InvalidTransOperationException(String)\l+ InvalidTransOperationException(String, Throwable)\l+ InvalidTransOperationException(Throwable)\l}"]; // 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"]; CustomerList -> Customer [arrowhead=diamond, label="contains"]; InventoryList -> InventoryPiece [arrowhead=diamond, label="contains"]; TransactionList -> Transaction [arrowhead=diamond, label="contains"]; // Composition/Association Relationships Customer -> Address [arrowhead=diamond, label="has"]; Transaction -> Address [arrowhead=diamond, label="has"]; Transaction -> InventoryList [arrowhead=diamond, label="has"]; // Manager Relationships CustomerManager -> CustomerList [arrowhead=diamond, label="manages"]; InventoryManager -> InventoryList [arrowhead=diamond, label="manages"]; TransactionManager -> TransactionList [arrowhead=diamond, label="manages"]; // Dependencies CustomerManager -> DataRepository [arrowhead=vee, style=dashed, label="uses"]; InventoryManager -> DataRepository [arrowhead=vee, style=dashed, label="uses"]; TransactionManager -> Customer [arrowhead=vee, style=dashed, label="uses"]; TransactionManager -> InventoryList [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"]; // Exception Usage CustomerManager -> InvalidRecordDataException [arrowhead=vee, style=dashed, label="throws"]; subgraph cluster_exceptions { label="Exception Classes"; style=filled; color=lightyellow; InvalidArtOperationException; InvalidRecordDataException; InvalidTransactionException; InvalidTransOperationException; } // Subgraphs for organization subgraph cluster_model { label="Model Classes"; style=filled; color=lightgrey; Address; Customer; InventoryPiece; Drawing; Painting; Print; Sculpture; Transaction; } subgraph cluster_managers { label="Manager Classes (Singletons)"; style=filled; color=lightgreen; CustomerManager; InventoryManager; TransactionManager; DataRepository; CustomerList; InventoryList; TransactionList; } }