2025-09-18 12:18:33 -04:00
|
|
|
digraph LodgeReservationSystem {
|
|
|
|
|
rankdir=TB;
|
2025-09-19 15:32:40 -04:00
|
|
|
node [shape=record, style=filled, fillcolor=lightyellow];
|
|
|
|
|
edge [arrowhead=empty];
|
|
|
|
|
|
|
|
|
|
// Data Package Classes
|
|
|
|
|
Account [label="{Account|
|
|
|
|
|
- account_number: String\l
|
|
|
|
|
- phone_number: String\l
|
|
|
|
|
- mailing_address: Address\l
|
|
|
|
|
- email_address: EmailAddress\l
|
|
|
|
|
- reservations: AccountReservationList\l|
|
|
|
|
|
+ Account()\l
|
|
|
|
|
+ Account(account_number, phone_number, mailing_address, email_address)\l
|
|
|
|
|
+ Account(phone_number, mailing_address, email_address)\l
|
|
|
|
|
+ toString(): String\l
|
|
|
|
|
+ add(rsrv: Reservation): boolean\l
|
|
|
|
|
+ Write(acct: Account): void\l
|
|
|
|
|
+ getAccount_number(): String\l
|
|
|
|
|
+ setAccount_number(account_number: String): void\l
|
|
|
|
|
+ getPhone_number(): String\l
|
|
|
|
|
+ setPhone_number(phone_number: String): void\l
|
|
|
|
|
+ getMailing_address(): Address\l
|
|
|
|
|
+ setMailing_address(mailing_address: Address): void\l
|
|
|
|
|
+ getEmail_address(): EmailAddress\l
|
|
|
|
|
+ setEmail_address(email_address: EmailAddress): void\l
|
|
|
|
|
+ hashCode(): int\l
|
|
|
|
|
+ findReservation(reservation_number: String): Reservation\l
|
|
|
|
|
+ equals(obj: Object): boolean\l
|
|
|
|
|
+ update(acct: Account): void\l
|
|
|
|
|
+ getAllReservations(): ListIterator\<IReservation\>\l
|
|
|
|
|
}"]
|
|
|
|
|
|
|
|
|
|
AccountList [label="{AccountList|
|
|
|
|
|
|
|
|
|
|
|
+ accountSerial(phone_number, mailing_address, email_address): String\l
|
|
|
|
|
+ add(account: Account): boolean\l
|
|
|
|
|
+ save(acct: Account): void\l
|
|
|
|
|
+ find(account_number: String): Account\l
|
|
|
|
|
+ getListOfReservations(): List\<? extends IReservation\>\l
|
|
|
|
|
+ showReservationList(): void\l
|
|
|
|
|
}"]
|
|
|
|
|
|
|
|
|
|
AccountReservationList [label="{AccountReservationList|
|
|
|
|
|
|
|
|
|
|
|
- reservationSerial(reservation: Reservation): String\l
|
|
|
|
|
+ add(reservation: IReservation): boolean\l
|
|
|
|
|
+ toString(): String\l
|
|
|
|
|
+ find(reservation_number: String): Reservation\l
|
|
|
|
|
+ update(incoming_reservation_list: AccountReservationList): void\l
|
|
|
|
|
}"]
|
|
|
|
|
|
|
|
|
|
Address [label="{Address|
|
|
|
|
|
- street: String\l
|
|
|
|
|
- city: String\l
|
|
|
|
|
- state: String\l
|
|
|
|
|
- zip: String\l|
|
|
|
|
|
+ Address(street, city, state, zip)\l
|
|
|
|
|
+ getStreet(): String\l
|
|
|
|
|
+ setStreet(street: String): void\l
|
|
|
|
|
+ getCity(): String\l
|
|
|
|
|
+ setCity(city: String): void\l
|
|
|
|
|
+ getState(): String\l
|
|
|
|
|
+ setState(state: String): void\l
|
|
|
|
|
+ getZip(): String\l
|
|
|
|
|
+ setZip(zip: String): void\l
|
|
|
|
|
+ hashCode(): int\l
|
|
|
|
|
+ equals(obj: Object): boolean\l
|
|
|
|
|
+ toString(): String\l
|
|
|
|
|
}"]
|
|
|
|
|
|
|
|
|
|
EmailAddress [label="{EmailAddress|
|
|
|
|
|
- email_address: String\l|
|
|
|
|
|
+ EmailAddress(email_address: String)\l
|
|
|
|
|
+ getEmail_address(): String\l
|
|
|
|
|
+ setEmail_address(email_address: String): void\l
|
|
|
|
|
+ hashCode(): int\l
|
|
|
|
|
+ equals(obj: Object): boolean\l
|
|
|
|
|
+ toString(): String\l
|
|
|
|
|
}"]
|
|
|
|
|
|
|
|
|
|
DataRepository [label="{DataRepository|
|
|
|
|
|
- directoryPath: String\l
|
|
|
|
|
- instance: DataRepository\l|
|
|
|
|
|
# getInstance(): DataRepository\l
|
|
|
|
|
+ setDataStoreRoot(directoryPath: String): void\l
|
|
|
|
|
+ getPath(): String\l
|
|
|
|
|
+ Reservation(type: String): Reservation\l
|
|
|
|
|
+ WalkFileSystemTree(manager: AccomodationManager, rootDir: Path): void\l
|
|
|
|
|
+ LoadAccount(file: Path): Account\l
|
|
|
|
|
- loadReservationRefList(rdr: JsonReader, ac: Account): void\l
|
|
|
|
|
- loadReservation(ac: Account, reservationType: String, reservationNumber: String): void\l
|
|
|
|
|
}"]
|
|
|
|
|
|
|
|
|
|
// Enums
|
|
|
|
|
KitchenTypeEnum [label="{«enumeration»\nKitchenTypeEnum|
|
|
|
|
|
None\l
|
|
|
|
|
Kitchenette\l
|
|
|
|
|
FullKitchen\l
|
|
|
|
|
}", fillcolor=lightblue]
|
|
|
|
|
|
|
|
|
|
ReservationStatusEnum [label="{«enumeration»\nReservationStatusEnum|
|
|
|
|
|
Draft\l
|
|
|
|
|
Canceled\l
|
|
|
|
|
Completed\l
|
|
|
|
|
}", fillcolor=lightblue]
|
|
|
|
|
|
|
|
|
|
// Exceptions
|
|
|
|
|
DuplicateObjectException [label="{DuplicateObjectException|
|
|
|
|
|
|
|
|
|
|
|
+ DuplicateObjectException()\l
|
|
|
|
|
+ DuplicateObjectException(message: String)\l
|
|
|
|
|
}", fillcolor=lightcoral]
|
|
|
|
|
|
|
|
|
|
IllegalOperationException [label="{IllegalOperationException|
|
|
|
|
|
|
|
|
|
|
|
+ IllegalOperationException()\l
|
|
|
|
|
+ IllegalOperationException(message: String)\l
|
|
|
|
|
}", fillcolor=lightcoral]
|
|
|
|
|
|
|
|
|
|
// Reservation Package
|
|
|
|
|
IReservation [label="{«interface»\nIReservation|
|
|
|
|
|
|
|
|
|
|
|
+ ReservationType(): String\l
|
|
|
|
|
+ copy(type: String): Reservation\l
|
|
|
|
|
+ getReservation_number(): String\l
|
|
|
|
|
+ getAccountNumber(): String\l
|
|
|
|
|
+ getPhysical_address(): Address\l
|
|
|
|
|
+ getPricePerNight(): float\l
|
|
|
|
|
+ calculatePrice(): float\l
|
|
|
|
|
+ checkValid(): boolean\l
|
|
|
|
|
}", fillcolor=lightgreen]
|
|
|
|
|
|
|
|
|
|
Reservation [label="{«abstract»\nReservation|
|
|
|
|
|
- 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|
|
|
|
|
|
# Reservation()\l
|
|
|
|
|
+ setReservation_number(reservation_number: String): void\l
|
|
|
|
|
+ getReservation_number(): String\l
|
|
|
|
|
+ getAccountNumber(): String\l
|
|
|
|
|
+ setAccountNumber(account_number: String): void\l
|
|
|
|
|
+ setPhysical_address(physical_address: Address): void\l
|
|
|
|
|
+ getPhysical_address(): Address\l
|
|
|
|
|
+ getMailing_address(): Address\l
|
|
|
|
|
+ setMailing_address(mailing_address: Address): void\l
|
|
|
|
|
+ setReservation_start_date(reservation_start_date: ZonedDateTime): void\l
|
|
|
|
|
+ getReservation_start_date(): ZonedDateTime\l
|
|
|
|
|
+ setReservation_end_date(reservation_end_date: ZonedDateTime): void\l
|
|
|
|
|
+ getReservation_end_date(): ZonedDateTime\l
|
|
|
|
|
+ setReservation_status(reservation_status: ReservationStatusEnum): void\l
|
|
|
|
|
+ getReservation_status(): ReservationStatusEnum\l
|
|
|
|
|
+ getKitchen(): KitchenTypeEnum\l
|
|
|
|
|
+ setKitchen(kitchen: KitchenTypeEnum): void\l
|
|
|
|
|
+ setNumberOfBeds(numberOfBeds: Integer): void\l
|
|
|
|
|
+ getNumberOfBeds(): Integer\l
|
|
|
|
|
+ numberOfBedRooms(): Integer\l
|
|
|
|
|
+ setNumberOfBedRooms(numberOfBedRooms: Integer): void\l
|
|
|
|
|
+ getNumberOfBedRooms(): Integer\l
|
|
|
|
|
+ setNumberOfBathRooms(numberOfBathRooms: Integer): void\l
|
|
|
|
|
+ getNumberOfBathRooms(): Integer\l
|
|
|
|
|
+ setNumberOfFloors(numberOfFloors: Integer): void\l
|
|
|
|
|
+ getNumberOfFloors(): Integer\l
|
|
|
|
|
+ setSquareFeet(squareFeet: Integer): void\l
|
|
|
|
|
+ getSquareFeet(): Integer\l
|
|
|
|
|
+ setPrice(price: Float): void\l
|
|
|
|
|
+ getPrice(): Float\l
|
|
|
|
|
+ getType(): char\l
|
|
|
|
|
+ setType(type: char): void\l
|
|
|
|
|
+ hashCode(): int\l
|
|
|
|
|
+ equals(obj: Object): boolean\l
|
|
|
|
|
+ toString(): String\l
|
|
|
|
|
+ Write(reservation: Reservation): void\l
|
|
|
|
|
+ Change(reservation: Reservation, newStatus: ReservationStatusEnum): void\l
|
|
|
|
|
+ update(rsrv: Reservation): void\l
|
|
|
|
|
+ {abstract} ReservationType(): String\l
|
|
|
|
|
}", fillcolor=lightgray]
|
|
|
|
|
|
|
|
|
|
// ReservationSystem Package
|
|
|
|
|
AccomodationManager [label="{AccomodationManager|
|
|
|
|
|
- accounts: AccountList\l|
|
|
|
|
|
+ AccomodationManager(home: String)\l
|
|
|
|
|
+ setDataStoreRoot(home: String): void\l
|
|
|
|
|
+ loadAll(): void\l
|
|
|
|
|
+ load(file: Path): void\l
|
|
|
|
|
+ retrieveLoadedAccounts(): List\<Account\>\l
|
|
|
|
|
+ retrieveAccount(acct_id: String): Account\l
|
|
|
|
|
+ AddAccount(acct: Account): void\l
|
|
|
|
|
+ UpdateAccount(acct: Account): void\l
|
|
|
|
|
+ newAccount(phone_number, mailing_address, email_address): Account\l
|
|
|
|
|
+ addReservation(account: Account, reservation: Reservation): boolean\l
|
|
|
|
|
+ findReservation(reservation_number: String): Reservation\l
|
|
|
|
|
+ getReservationList(): List\<? extends IReservation\>\l
|
|
|
|
|
+ showReservationList(): void\l
|
|
|
|
|
}"]
|
|
|
|
|
|
|
|
|
|
HotelReservation [label="{HotelReservation|
|
|
|
|
|
|
|
|
|
|
|
+ HotelReservation()\l
|
|
|
|
|
+ HotelReservation(physical_address: Address)\l
|
|
|
|
|
+ copy(reservationType: String): Reservation\l
|
|
|
|
|
+ ReservationType(): String\l
|
|
|
|
|
+ checkValid(): boolean\l
|
|
|
|
|
+ getPricePerNight(): float\l
|
|
|
|
|
+ calculatePrice(): float\l
|
|
|
|
|
}"]
|
|
|
|
|
|
|
|
|
|
HouseReservation [label="{HouseReservation|
|
|
|
|
|
|
|
|
|
|
|
+ HouseReservation()\l
|
|
|
|
|
+ HouseReservation(physical_address: Address)\l
|
|
|
|
|
+ copy(reservationType: String): Reservation\l
|
|
|
|
|
+ ReservationType(): String\l
|
|
|
|
|
+ checkValid(): boolean\l
|
|
|
|
|
+ getPricePerNight(): float\l
|
|
|
|
|
+ calculatePrice(): float\l
|
|
|
|
|
}"]
|
|
|
|
|
|
|
|
|
|
CabinReservation [label="{CabinReservation|
|
|
|
|
|
|
|
|
|
|
|
+ CabinReservation()\l
|
|
|
|
|
+ CabinReservation(physical_address: Address)\l
|
|
|
|
|
+ ReservationType(): String\l
|
|
|
|
|
+ checkValid(): boolean\l
|
|
|
|
|
+ getPricePerNight(): float\l
|
|
|
|
|
+ calculatePrice(): float\l
|
|
|
|
|
}"]
|
|
|
|
|
|
|
|
|
|
TestReservations [label="{TestReservations|
|
|
|
|
|
|
|
|
|
|
|
+ main(args: String[]): void\l
|
|
|
|
|
}"]
|
|
|
|
|
|
|
|
|
|
getRepositoryConfig [label="{getRepositoryConfig|
|
|
|
|
|
|
|
|
|
|
|
+ getPath(): String\l
|
|
|
|
|
}"]
|
|
|
|
|
|
|
|
|
|
// Base class relationships
|
|
|
|
|
RuntimeException [label="RuntimeException", fillcolor=white]
|
|
|
|
|
ArrayList [label="ArrayList\<T\>", fillcolor=white]
|
|
|
|
|
|
|
|
|
|
// Inheritance relationships
|
|
|
|
|
AccountList -> ArrayList [arrowhead=empty]
|
|
|
|
|
AccountReservationList -> ArrayList [arrowhead=empty]
|
|
|
|
|
DuplicateObjectException -> RuntimeException [arrowhead=empty]
|
|
|
|
|
IllegalOperationException -> RuntimeException [arrowhead=empty]
|
2025-09-18 12:18:33 -04:00
|
|
|
|
2025-09-19 15:32:40 -04:00
|
|
|
// Interface implementation
|
|
|
|
|
Reservation -> IReservation [arrowhead=empty, style=dashed]
|
2025-09-18 12:18:33 -04:00
|
|
|
|
2025-09-19 15:32:40 -04:00
|
|
|
// Class inheritance
|
|
|
|
|
HotelReservation -> Reservation [arrowhead=empty]
|
|
|
|
|
HouseReservation -> Reservation [arrowhead=empty]
|
|
|
|
|
CabinReservation -> Reservation [arrowhead=empty]
|
|
|
|
|
|
2025-09-18 21:39:24 -04:00
|
|
|
// Composition relationships
|
2025-09-19 15:32:40 -04:00
|
|
|
Account -> AccountReservationList [arrowhead=diamond, label="1"]
|
|
|
|
|
Account -> Address [arrowhead=diamond, label="1"]
|
|
|
|
|
Account -> EmailAddress [arrowhead=diamond, label="1"]
|
2025-09-18 12:18:33 -04:00
|
|
|
|
2025-09-19 15:32:40 -04:00
|
|
|
// Aggregation relationships
|
|
|
|
|
AccomodationManager -> AccountList [arrowhead=odiamond, label="1"]
|
|
|
|
|
AccountList -> Account [arrowhead=odiamond, label="*"]
|
|
|
|
|
AccountReservationList -> IReservation [arrowhead=odiamond, label="0...*"]
|
2025-09-18 12:18:33 -04:00
|
|
|
|
2025-09-19 15:32:40 -04:00
|
|
|
// Association relationships
|
|
|
|
|
Reservation -> Address [arrowhead=vee, label="uses", style=dashed]
|
|
|
|
|
Reservation -> ReservationStatusEnum [arrowhead=vee, label="uses", style=dashed]
|
|
|
|
|
Reservation -> KitchenTypeEnum [arrowhead=vee, label="uses", style=dashed]
|
2025-09-18 12:18:33 -04:00
|
|
|
|
2025-09-19 15:32:40 -04:00
|
|
|
// Dependency relationships
|
|
|
|
|
DataRepository -> AccomodationManager [arrowhead=vee, style=dashed, label="uses"]
|
|
|
|
|
DataRepository -> Account [arrowhead=vee, style=dashed, label="creates"]
|
|
|
|
|
DataRepository -> Reservation [arrowhead=vee, style=dashed, label="creates"]
|
|
|
|
|
TestReservations -> AccomodationManager [arrowhead=vee, style=dashed, label="uses"]
|
|
|
|
|
TestReservations -> getRepositoryConfig [arrowhead=vee, style=dashed, label="uses"]
|
2025-09-18 12:18:33 -04:00
|
|
|
|
2025-09-19 15:32:40 -04:00
|
|
|
// Singleton pattern
|
|
|
|
|
DataRepository -> DataRepository [arrowhead=vee, style=dashed, label="singleton"]
|
2025-09-18 12:18:33 -04:00
|
|
|
}
|