113 lines
9.2 KiB
Plaintext
113 lines
9.2 KiB
Plaintext
digraph LodgeReservationSystem {
|
|
// Graph settings
|
|
rankdir=TB;
|
|
node [shape=record, fontname="Arial", fontsize=10];
|
|
edge [arrowhead="empty", fontname="Arial", fontsize=9];
|
|
|
|
// Package clusters
|
|
subgraph cluster_data {
|
|
label="lodge.data";
|
|
style=dashed;
|
|
color=blue;
|
|
|
|
// Account class
|
|
Account [label="{Account|+ Account()\l+ Account(String, String, Address, EmailAddress)\l+ Account(String, Address, EmailAddress)\l|+ toString(): String\l+ add(Reservation): boolean\l+ Write(Account): void\l+ getAccount_number(): String\l+ setAccount_number(String): void\l+ getPhone_number(): String\l+ setPhone_number(String): void\l+ getMailing_address(): Address\l+ setMailing_address(Address): void\l+ getEmail_address(): EmailAddress\l+ setEmail_address(EmailAddress): void\l+ findReservation(String): Reservation\l+ update(Account): void\l+ getAllReservations(): ListIterator\<IReservation\>\l+ hashCode(): int\l+ equals(Object): boolean\l}"];
|
|
|
|
// AccountList class
|
|
AccountList [label="{AccountList|+ AccountList()\l|+ accountSerial(String, Address, EmailAddress): String\l+ add(Account): boolean\l+ save(Account): void\l+ find(String): Account\l+ getListOfReservations(): List\<? extends IReservation\>\l+ showReservationList(): void\l}"];
|
|
|
|
// AccountReservationList class
|
|
AccountReservationList [label="{AccountReservationList|+ AccountReservationList()\l|- reservationSerial(Reservation): String\l|+ add(IReservation): boolean\l+ toString(): String\l+ find(String): Reservation\l+ update(AccountReservationList): void\l}"];
|
|
|
|
// Address class
|
|
Address [label="{Address|- 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}"];
|
|
|
|
// EmailAddress class
|
|
EmailAddress [label="{EmailAddress|+ EmailAddress(String)\l|+ getEmail_address(): String\l+ setEmail_address(String): void\l+ hashCode(): int\l+ equals(Object): boolean\l+ toString(): String\l}"];
|
|
|
|
// Exception classes
|
|
DuplicateObjectException [label="{DuplicateObjectException|+ DuplicateObjectException()\l+ DuplicateObjectException(String)\l}"];
|
|
IllegalOperationException [label="{IllegalOperationException|+ IllegalOperationException()\l+ IllegalOperationException(String)\l}"];
|
|
|
|
// Enums
|
|
KitchenTypeEnum [label="{«enumeration»\lKitchenTypeEnum|None\lKitchenette\lFullKitchen\l}"];
|
|
ReservationStatusEnum [label="{«enumeration»\lReservationStatusEnum|Draft\lCanceled\lCompleted\l}"];
|
|
}
|
|
|
|
subgraph cluster_reservation {
|
|
label="lodge.reservation";
|
|
style=dashed;
|
|
color=green;
|
|
|
|
// IReservation interface
|
|
IReservation [label="{«interface»\lIReservation|+ ReservationType(): String\l+ copy(String): Reservation\l+ getReservation_number(): String\l+ getAccountNumber(): String\l+ getPhysical_address(): Address\l+ getPricePerNight(): float\l+ calculatePrice(): float\l+ checkValid(): boolean\l}"];
|
|
|
|
// Reservation abstract class
|
|
Reservation [label="{«abstract»\lReservation|# Reservation()\l|+ setReservation_number(String): void\l+ getReservation_number(): String\l+ getAccountNumber(): String\l+ setAccountNumber(String): void\l+ setPhysical_address(Address): void\l+ mailing_address(): Address\l+ setMailing_address(Address): void\l+ setReservation_start_date(ZonedDateTime): void\l+ setReservation_end_date(ZonedDateTime): void\l+ setReservation_status(ReservationStatusEnum): void\l+ getKitchen(): KitchenTypeEnum\l+ setKitchen(KitchenTypeEnum): void\l+ setNumberOfBeds(Integer): void\l+ numberOfBedRooms(): Integer\l+ setNumberOfBedRooms(Integer): void\l+ setNumberOfBathRooms(Integer): void\l+ setNumberOfFloors(Integer): void\l+ setSquareFeet(Integer): void\l+ setPrice(Float): void\l+ getType(): char\l+ setType(char): void\l+ getPhysical_address(): Address\l+ getMailing_address(): Address\l+ getReservation_start_date(): ZonedDateTime\l+ getReservation_end_date(): ZonedDateTime\l+ getReservation_status(): ReservationStatusEnum\l+ getNumberOfBeds(): Integer\l+ getNumberOfBedRooms(): Integer\l+ getNumberOfBathRooms(): Integer\l+ getNumberOfFloors(): Integer\l+ getSquareFeet(): Integer\l+ getPrice(): Float\l+ hashCode(): int\l+ equals(Object): boolean\l+ toString(): String\l+ Write(Reservation): void\l+ Change(Reservation, ReservationStatusEnum): void\l+ update(Reservation): void\l+ ReservationType(): String\l}"];
|
|
}
|
|
|
|
subgraph cluster_reservationsystem {
|
|
label="lodge.reservationsystem";
|
|
style=dashed;
|
|
color=red;
|
|
|
|
// Concrete reservation classes
|
|
CabinReservation [label="{CabinReservation|+ CabinReservation()\l+ CabinReservation(Address)\l|+ ReservationType(): String\l+ checkValid(): boolean\l+ getPricePerNight(): float\l+ calculatePrice(): float\l}"];
|
|
|
|
HotelReservation [label="{HotelReservation|+ HotelReservation()\l+ HotelReservation(Address)\l|+ copy(String): Reservation\l+ ReservationType(): String\l+ checkValid(): boolean\l+ getPricePerNight(): float\l+ calculatePrice(): float\l}"];
|
|
|
|
HouseReservation [label="{HouseReservation|+ HouseReservation()\l+ HouseReservation(Address)\l|+ copy(String): Reservation\l+ ReservationType(): String\l+ checkValid(): boolean\l+ getPricePerNight(): float\l+ calculatePrice(): float\l}"];
|
|
|
|
// AccommodationManager class
|
|
AccomodationManager [label="{AccomodationManager|- AccomodationManager()\l+ AccomodationManager(String)\l|+ setDataStoreRoot(String): void\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}"];
|
|
|
|
// DataRepository class
|
|
DataRepository [label="{DataRepository|# getInstance(): DataRepository\l|+ setDataStoreRoot(String): void\l+ getPath(): String\l+ Reservation(String): Reservation\l+ WalkFileSystemTree(AccomodationManager, Path): void\l+ LoadAccount(Path): Account\l- loadReservationRefList(JsonReader, Account): void\l- loadReservation(Account, String, String): void\l}"];
|
|
}
|
|
|
|
subgraph cluster_main {
|
|
label="lodge";
|
|
style=dashed;
|
|
color=purple;
|
|
|
|
TestReservations [label="{TestReservations|+ main(String[]): void\l}"];
|
|
|
|
getRepositoryConfig [label="{getRepositoryConfig|+ getPath(): String\l}"];
|
|
}
|
|
|
|
// Inheritance relationships
|
|
AccountList -> "ArrayList<Account>" [arrowhead=empty, style=solid];
|
|
AccountReservationList -> "ArrayList<IReservation>" [arrowhead=empty, style=solid];
|
|
Reservation -> IReservation [arrowhead=empty, style=dashed, label="implements"];
|
|
CabinReservation -> Reservation [arrowhead=empty, style=solid];
|
|
HotelReservation -> Reservation [arrowhead=empty, style=solid];
|
|
HouseReservation -> Reservation [arrowhead=empty, style=solid];
|
|
DuplicateObjectException -> RuntimeException [arrowhead=empty, style=solid];
|
|
IllegalOperationException -> RuntimeException [arrowhead=empty, style=solid];
|
|
|
|
// Composition relationships (filled diamond)
|
|
Account -> AccountReservationList [arrowhead=none, arrowtail=diamond, style=solid, label="1"];
|
|
Account -> Address [arrowhead=none, arrowtail=diamond, style=solid, label="2"];
|
|
Account -> EmailAddress [arrowhead=none, arrowtail=diamond, style=solid, label="1"];
|
|
AccomodationManager -> AccountList [arrowhead=none, arrowtail=odiamond, style=solid, label="1"];
|
|
|
|
// Aggregation relationships (empty diamond)
|
|
AccountList -> Account [arrowhead=none, arrowtail=odiamond, style=solid, label="*"];
|
|
AccountReservationList -> IReservation [arrowhead=empty, arrowtail=odiamond, style=solid, label="0..*"];
|
|
|
|
// Association relationships
|
|
Reservation -> Address [arrowhead=none, style=solid, label="uses"];
|
|
Reservation -> KitchenTypeEnum [arrowhead=none, style=solid, label="uses"];
|
|
Reservation -> ReservationStatusEnum [arrowhead=none, style=solid, label="uses"];
|
|
AccomodationManager -> Account [arrowhead=none, arrowtail=odiamond, label="manages"];
|
|
AccomodationManager -> Reservation [arrowhead=none, style=dashed, label="manages"];
|
|
DataRepository -> AccomodationManager [arrowhead=none, style=dashed, label="uses"];
|
|
TestReservations -> AccomodationManager [arrowhead=none, style=dashed, label="uses"];
|
|
TestReservations -> getRepositoryConfig [arrowhead=none, style=dashed, label="uses"];
|
|
|
|
// Dependency relationships
|
|
Account -> DuplicateObjectException [arrowhead=open, style=dashed, label="throws"];
|
|
AccountList -> DuplicateObjectException [arrowhead=open, style=dashed, label="throws"];
|
|
AccountReservationList -> DuplicateObjectException [arrowhead=open, style=dashed, label="throws"];
|
|
Reservation -> IllegalOperationException [arrowhead=open, style=dashed, label="throws"];
|
|
} |