2025-09-18 12:18:33 -04:00
|
|
|
digraph LodgeReservationSystem {
|
2025-09-18 21:39:24 -04:00
|
|
|
// Graph attributes
|
2025-09-18 12:18:33 -04:00
|
|
|
rankdir=TB;
|
|
|
|
|
node [shape=record, fontname="Arial", fontsize=10];
|
|
|
|
|
edge [fontname="Arial", fontsize=8];
|
|
|
|
|
|
2025-09-18 21:39:24 -04:00
|
|
|
// Package: lodge.data
|
2025-09-18 12:18:33 -04:00
|
|
|
subgraph cluster_data {
|
|
|
|
|
label="lodge.data";
|
|
|
|
|
style=filled;
|
|
|
|
|
color=lightgrey;
|
|
|
|
|
|
2025-09-18 21:39:24 -04:00
|
|
|
// Core data classes
|
|
|
|
|
Account [label="{Account|+ account_number: String\l+ phone_number: String\l+ mailing_address: Address\l+ email_address: EmailAddress\l+ reservations: AccountReservationList\l|+ add(Reservation): boolean\l+ findReservation(String): Reservation\l+ getAllReservations(): ListIterator\<IReservation\>\l+ update(Account): void\l+ Write(Account): void\l}"];
|
2025-09-18 12:18:33 -04:00
|
|
|
|
2025-09-18 21:39:24 -04:00
|
|
|
AccountList [label="{AccountList|extends ArrayList\<Account\>|+ accountSerial(String, Address, EmailAddress): String\l+ add(Account): boolean\l+ find(String): Account\l+ save(Account): void\l+ getListOfReservations(): List\<? extends IReservation\>\l+ showReservationList(): void\l}"];
|
2025-09-18 12:18:33 -04:00
|
|
|
|
2025-09-18 21:39:24 -04:00
|
|
|
AccountReservationList [label="{AccountReservationList|extends ArrayList\<IReservation\>|+ add(IReservation): boolean\l+ find(String): Reservation\l+ update(AccountReservationList): void\l+ toString(): String\l}"];
|
2025-09-18 12:18:33 -04:00
|
|
|
|
2025-09-18 21:39:24 -04:00
|
|
|
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+ equals(Object): boolean\l+ hashCode(): int\l+ toString(): String\l}"];
|
2025-09-18 12:18:33 -04:00
|
|
|
|
2025-09-18 21:39:24 -04:00
|
|
|
EmailAddress [label="{EmailAddress|+ email_address: String\l|+ getEmail_address(): String\l+ setEmail_address(String): void\l+ equals(Object): boolean\l+ hashCode(): int\l+ toString(): String\l}"];
|
2025-09-18 12:18:33 -04:00
|
|
|
|
2025-09-18 21:39:24 -04:00
|
|
|
DataRepository [label="{DataRepository|- directoryPath: String\l- instance: DataRepository\l|+ setDataStoreRoot(String): void\l+ getPath(): String\l+ Reservation(String): Reservation\l+ WalkFileSystemTree(AccomodationManager, Path): void\l+ LoadAccount(Path): Account\l}"];
|
2025-09-18 12:18:33 -04:00
|
|
|
|
2025-09-18 21:39:24 -04:00
|
|
|
// Enums
|
|
|
|
|
KitchenTypeEnum [label="{«enumeration»\lKitchenTypeEnum|None\lKitchenette\lFullKitchen\l}"];
|
2025-09-18 12:18:33 -04:00
|
|
|
|
2025-09-18 21:39:24 -04:00
|
|
|
ReservationStatusEnum [label="{«enumeration»\lReservationStatusEnum|Draft\lCanceled\lCompleted\l}"];
|
2025-09-18 12:18:33 -04:00
|
|
|
|
2025-09-18 21:39:24 -04:00
|
|
|
// Exceptions
|
|
|
|
|
DuplicateObjectException [label="{DuplicateObjectException|+ DuplicateObjectException()\l+ DuplicateObjectException(String)\l}"];
|
2025-09-18 12:18:33 -04:00
|
|
|
|
2025-09-18 21:39:24 -04:00
|
|
|
IllegalOperationException [label="{IllegalOperationException|+ IllegalOperationException()\l+ IllegalOperationException(String)\l}"];
|
2025-09-18 12:18:33 -04:00
|
|
|
}
|
|
|
|
|
|
2025-09-18 21:39:24 -04:00
|
|
|
// Package: lodge.reservation
|
|
|
|
|
subgraph cluster_reservation {
|
|
|
|
|
label="lodge.reservation";
|
2025-09-18 12:18:33 -04:00
|
|
|
style=filled;
|
|
|
|
|
color=lightblue;
|
|
|
|
|
|
2025-09-18 21:39:24 -04:00
|
|
|
IReservation [label="{«interface»\lIReservation|+ ReservationType(): String\l+ getReservation_number(): String\l+ getAccountNumber(): String\l+ getPhysical_address(): Address\l+ getPricePerNight(): float\l+ calculatePrice(): float\l+ checkValid(): boolean\l}"];
|
2025-09-18 12:18:33 -04:00
|
|
|
|
2025-09-18 21:39:24 -04:00
|
|
|
Reservation [label="{«abstract»\lReservation|# type: char\l# reservation_number: String\l# physical_address: Address\l# mailing_address: Address\l# reservation_start_date: ZonedDateTime\l# reservation_end_date: ZonedDateTime\l# reservation_status: ReservationStatusEnum\l# kitchen: KitchenTypeEnum\l# numberOfBeds: Integer\l# numberOfBedRooms: Integer\l# numberOfBathRooms: Integer\l# numberOfFloors: Integer\l# squareFeet: Integer\l# price: Float\l# accountNumber: String\l|+ getReservation_number(): String\l+ setReservation_number(String): void\l+ getAccountNumber(): String\l+ setAccountNumber(String): void\l+ getPhysical_address(): Address\l+ setPhysical_address(Address): void\l+ Write(Reservation): void\l+ Change(Reservation, ReservationStatusEnum): void\l+ update(Reservation): void\l+ ReservationType(): String\l}"];
|
2025-09-18 12:18:33 -04:00
|
|
|
}
|
|
|
|
|
|
2025-09-18 21:39:24 -04:00
|
|
|
// Package: lodge.reservationsystem
|
|
|
|
|
subgraph cluster_reservationsystem {
|
|
|
|
|
label="lodge.reservationsystem";
|
2025-09-18 12:18:33 -04:00
|
|
|
style=filled;
|
|
|
|
|
color=lightyellow;
|
|
|
|
|
|
2025-09-18 21:39:24 -04:00
|
|
|
AccomodationManager [label="{AccomodationManager|- accounts: AccountList\l|+ loadAll(): void\l+ load(Path): void\l+ retrieveLoadedAccounts(): List\<Account\>\l+ retrieveAccount(String): Account\l+ AddAccount(Account): void\l+ UpdateAccount(Account): void\l+ newAccount(String, Address, EmailAddress): Account\l+ addReservation(Account, Reservation): boolean\l+ findReservation(String): Reservation\l+ getReservationList(): List\<? extends IReservation\>\l+ showReservationList(): void\l}"];
|
|
|
|
|
|
|
|
|
|
HotelReservation [label="{HotelReservation|extends Reservation|+ HotelReservation()\l+ HotelReservation(Address)\l+ copy(String): Reservation\l+ ReservationType(): String\l+ checkValid(): boolean\l+ getPricePerNight(): float\l+ calculatePrice(): float\l}"];
|
|
|
|
|
|
|
|
|
|
CabinReservation [label="{CabinReservation|extends Reservation|+ CabinReservation()\l+ CabinReservation(Address)\l+ ReservationType(): String\l+ checkValid(): boolean\l+ getPricePerNight(): float\l+ calculatePrice(): float\l}"];
|
|
|
|
|
|
|
|
|
|
HouseReservation [label="{HouseReservation|extends Reservation|+ HouseReservation()\l+ HouseReservation(Address)\l+ copy(String): Reservation\l+ ReservationType(): String\l+ checkValid(): boolean\l+ getPricePerNight(): float\l+ calculatePrice(): float\l}"];
|
2025-09-18 12:18:33 -04:00
|
|
|
}
|
|
|
|
|
|
2025-09-18 21:39:24 -04:00
|
|
|
// Test class
|
|
|
|
|
TestReservations [label="{TestReservations|+ main(String[]): void\l}"];
|
2025-09-18 12:18:33 -04:00
|
|
|
|
2025-09-18 21:39:24 -04:00
|
|
|
// Relationships
|
2025-09-18 12:18:33 -04:00
|
|
|
|
2025-09-18 21:39:24 -04:00
|
|
|
// Composition relationships
|
|
|
|
|
Account -> AccountReservationList [label="1" arrowhead=diamond];
|
|
|
|
|
Account -> Address [label="1" arrowhead=diamond];
|
|
|
|
|
Account -> EmailAddress [label="1" arrowhead=diamond];
|
|
|
|
|
AccountList -> Account [label="0...*" arrowhead=odiamond];
|
|
|
|
|
AccountReservationList -> IReservation [label="0...*" arrowhead=odiamond];
|
|
|
|
|
AccomodationManager -> AccountList [label="1" arrowhead=diamond];
|
2025-09-18 12:18:33 -04:00
|
|
|
|
2025-09-18 21:39:24 -04:00
|
|
|
// Inheritance relationships
|
|
|
|
|
Reservation -> IReservation [arrowhead=empty, style=dashed, label="implements"];
|
|
|
|
|
HotelReservation -> Reservation [arrowhead=empty, label="extends"];
|
|
|
|
|
CabinReservation -> Reservation [arrowhead=empty, label="extends"];
|
|
|
|
|
HouseReservation -> Reservation [arrowhead=empty, label="extends"];
|
2025-09-18 12:18:33 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-09-18 21:39:24 -04:00
|
|
|
// Dependencies and associations
|
|
|
|
|
Reservation -> Address [label="1", arrowhead=diamond];
|
|
|
|
|
Reservation -> KitchenTypeEnum [arrowhead=open, style=dashed];
|
|
|
|
|
Reservation -> ReservationStatusEnum [arrowhead=open, style=dashed];
|
|
|
|
|
DataRepository -> AccomodationManager [arrowhead=open, style=dashed];
|
2025-09-18 12:18:33 -04:00
|
|
|
|
2025-09-18 21:39:24 -04:00
|
|
|
AccomodationManager -> Reservation [arrowhead=open, style=dashed];
|
|
|
|
|
AccomodationManager -> DataRepository [arrowhead=open, style=dashed];
|
|
|
|
|
TestReservations -> AccomodationManager [arrowhead=open, style=dashed];
|
|
|
|
|
TestReservations -> HotelReservation [arrowhead=open, style=dashed];
|
|
|
|
|
TestReservations -> CabinReservation [arrowhead=open, style=dashed];
|
|
|
|
|
TestReservations -> HouseReservation [arrowhead=open, style=dashed];
|
2025-09-18 12:18:33 -04:00
|
|
|
|
|
|
|
|
// Exception relationships
|
2025-09-18 21:39:24 -04:00
|
|
|
AccountList -> DuplicateObjectException [arrowhead=open, style=dashed];
|
|
|
|
|
AccountReservationList -> DuplicateObjectException [arrowhead=open, style=dashed];
|
|
|
|
|
Reservation -> IllegalOperationException [arrowhead=open, style=dashed];
|
|
|
|
|
Reservation -> ZonedDateTime [arrowhead=open, style=dashed];
|
2025-09-18 12:18:33 -04:00
|
|
|
}
|