diff --git a/sdd/readme.docx b/sdd/readme.docx new file mode 100644 index 0000000..092d632 Binary files /dev/null and b/sdd/readme.docx differ diff --git a/uml/classdiagram.dot b/uml/classdiagram.dot index c113ea9..b8208af 100644 --- a/uml/classdiagram.dot +++ b/uml/classdiagram.dot @@ -1,102 +1,293 @@ digraph LodgeReservationSystem { - // Graph attributes rankdir=TB; - node [shape=record, fontname="Arial", fontsize=10]; - edge [fontname="Arial", fontsize=8]; - - // Package: lodge.data - subgraph cluster_data { - label="lodge.data"; - style=filled; - color=lightgrey; - - // 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\\l+ update(Account): void\l+ Write(Account): void\l}"]; - - AccountList [label="{AccountList|extends ArrayList\|+ accountSerial(String, Address, EmailAddress): String\l+ add(Account): boolean\l+ find(String): Account\l+ save(Account): void\l+ getListOfReservations(): List\\l+ showReservationList(): void\l}"]; - - AccountReservationList [label="{AccountReservationList|extends ArrayList\|+ add(IReservation): boolean\l+ find(String): Reservation\l+ update(AccountReservationList): void\l+ toString(): String\l}"]; - - 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}"]; - - 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}"]; - - 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}"]; - - // Enums - KitchenTypeEnum [label="{«enumeration»\lKitchenTypeEnum|None\lKitchenette\lFullKitchen\l}"]; - - ReservationStatusEnum [label="{«enumeration»\lReservationStatusEnum|Draft\lCanceled\lCompleted\l}"]; - - // Exceptions - DuplicateObjectException [label="{DuplicateObjectException|+ DuplicateObjectException()\l+ DuplicateObjectException(String)\l}"]; - - IllegalOperationException [label="{IllegalOperationException|+ IllegalOperationException()\l+ IllegalOperationException(String)\l}"]; - } - - // Package: lodge.reservation - subgraph cluster_reservation { - label="lodge.reservation"; - style=filled; - color=lightblue; - - 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}"]; - - 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}"]; - } - - // Package: lodge.reservationsystem - subgraph cluster_reservationsystem { - label="lodge.reservationsystem"; - style=filled; - color=lightyellow; - - AccomodationManager [label="{AccomodationManager|- accounts: AccountList\l|+ loadAll(): void\l+ load(Path): void\l+ retrieveLoadedAccounts(): List\\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\\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}"]; - } - - // Test class - TestReservations [label="{TestReservations|+ main(String[]): void\l}"]; - - // Relationships - - // 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]; - + 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\\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\\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\\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\\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\", fillcolor=white] + // 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"]; + AccountList -> ArrayList [arrowhead=empty] + AccountReservationList -> ArrayList [arrowhead=empty] + DuplicateObjectException -> RuntimeException [arrowhead=empty] + IllegalOperationException -> RuntimeException [arrowhead=empty] + // Interface implementation + Reservation -> IReservation [arrowhead=empty, style=dashed] + // Class inheritance + HotelReservation -> Reservation [arrowhead=empty] + HouseReservation -> Reservation [arrowhead=empty] + CabinReservation -> Reservation [arrowhead=empty] + + // Composition relationships + Account -> AccountReservationList [arrowhead=diamond, label="1"] + Account -> Address [arrowhead=diamond, label="1"] + Account -> EmailAddress [arrowhead=diamond, label="1"] - // 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]; + // Aggregation relationships + AccomodationManager -> AccountList [arrowhead=odiamond, label="1"] + AccountList -> Account [arrowhead=odiamond, label="*"] + AccountReservationList -> IReservation [arrowhead=odiamond, label="0...*"] - 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]; + // 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] - // Exception relationships - AccountList -> DuplicateObjectException [arrowhead=open, style=dashed]; - AccountReservationList -> DuplicateObjectException [arrowhead=open, style=dashed]; - Reservation -> IllegalOperationException [arrowhead=open, style=dashed]; - Reservation -> ZonedDateTime [arrowhead=open, style=dashed]; + // 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"] + + // Singleton pattern + DataRepository -> DataRepository [arrowhead=vee, style=dashed, label="singleton"] } \ No newline at end of file diff --git a/uml/classdiagram.svg b/uml/classdiagram.svg index 51646be..f38e095 100644 --- a/uml/classdiagram.svg +++ b/uml/classdiagram.svg @@ -1,451 +1,453 @@ - - - + + LodgeReservationSystem - - -cluster_reservationsystem - -lodge.reservationsystem - - -cluster_data - -lodge.data - - -cluster_reservation - -lodge.reservation - + Account - -Account - -+ account_number: String -+ phone_number: String -+ mailing_address: Address -+ email_address: EmailAddress -+ reservations: AccountReservationList - -+ add(Reservation): boolean -+ findReservation(String): Reservation -+ getAllReservations(): ListIterator<IReservation> -+ update(Account): void -+ Write(Account): void + +Account + +- account_number: String + - phone_number: String + - mailing_address: Address + - email_address: EmailAddress + - reservations: AccountReservationList + ++ Account() + + Account(account_number, phone_number, mailing_address, email_address) + + Account(phone_number, mailing_address, email_address) + + toString(): String + + add(rsrv: Reservation): boolean + + Write(acct: Account): void + + getAccount_number(): String + + setAccount_number(account_number: String): void + + getPhone_number(): String + + setPhone_number(phone_number: String): void + + getMailing_address(): Address + + setMailing_address(mailing_address: Address): void + + getEmail_address(): EmailAddress + + setEmail_address(email_address: EmailAddress): void + + hashCode(): int + + findReservation(reservation_number: String): Reservation + + equals(obj: Object): boolean + + update(acct: Account): void + + getAllReservations(): ListIterator<IReservation> AccountReservationList - -AccountReservationList - -extends ArrayList<IReservation> - -+ add(IReservation): boolean -+ find(String): Reservation -+ update(AccountReservationList): void -+ toString(): String + +AccountReservationList + + + +- reservationSerial(reservation: Reservation): String + + add(reservation: IReservation): boolean + + toString(): String + + find(reservation_number: String): Reservation + + update(incoming_reservation_list: AccountReservationList): void - + Account->AccountReservationList - - -1 + + +1 Address - -Address - -+ street: String -+ city: String -+ state: String -+ zip: String - -+ getStreet(): String -+ setStreet(String): void -+ getCity(): String -+ setCity(String): void -+ getState(): String -+ setState(String): void -+ getZip(): String -+ setZip(String): void -+ equals(Object): boolean -+ hashCode(): int -+ toString(): String + +Address + +- street: String + - city: String + - state: String + - zip: String + ++ Address(street, city, state, zip) + + getStreet(): String + + setStreet(street: String): void + + getCity(): String + + setCity(city: String): void + + getState(): String + + setState(state: String): void + + getZip(): String + + setZip(zip: String): void + + hashCode(): int + + equals(obj: Object): boolean + + toString(): String - + Account->Address - - -1 + + +1 EmailAddress - -EmailAddress - -+ email_address: String - -+ getEmail_address(): String -+ setEmail_address(String): void -+ equals(Object): boolean -+ hashCode(): int -+ toString(): String + +EmailAddress + +- email_address: String + ++ EmailAddress(email_address: String) + + getEmail_address(): String + + setEmail_address(email_address: String): void + + hashCode(): int + + equals(obj: Object): boolean + + toString(): String - + Account->EmailAddress - - -1 + + +1 AccountList - -AccountList - -extends ArrayList<Account> - -+ accountSerial(String, Address, EmailAddress): String -+ add(Account): boolean -+ find(String): Account -+ save(Account): void -+ getListOfReservations(): List<? extends IReservation> -+ showReservationList(): void + +AccountList + + + ++ accountSerial(phone_number, mailing_address, email_address): String + + add(account: Account): boolean + + save(acct: Account): void + + find(account_number: String): Account + + getListOfReservations(): List<? extends IReservation> + + showReservationList(): void - + AccountList->Account - - -0...* + + +* - - -DuplicateObjectException - -DuplicateObjectException - -+ DuplicateObjectException() -+ DuplicateObjectException(String) + + +ArrayList + +ArrayList<T> - - -AccountList->DuplicateObjectException - - - - - -AccountReservationList->DuplicateObjectException - - + + +AccountList->ArrayList + + IReservation - -«interface» -IReservation - -+ ReservationType(): String -+ getReservation_number(): String -+ getAccountNumber(): String -+ getPhysical_address(): Address -+ getPricePerNight(): float -+ calculatePrice(): float -+ checkValid(): boolean + +«interface» +IReservation + + + ++ ReservationType(): String + + copy(type: String): Reservation + + getReservation_number(): String + + getAccountNumber(): String + + getPhysical_address(): Address + + getPricePerNight(): float + + calculatePrice(): float + + checkValid(): boolean - + AccountReservationList->IReservation - - -0...* + + +0...* + + + +AccountReservationList->ArrayList + + DataRepository - -DataRepository - -- directoryPath: String -- instance: DataRepository - -+ setDataStoreRoot(String): void -+ getPath(): String -+ Reservation(String): Reservation -+ WalkFileSystemTree(AccomodationManager, Path): void -+ LoadAccount(Path): Account + +DataRepository + +- directoryPath: String + - instance: DataRepository + +# getInstance(): DataRepository + + setDataStoreRoot(directoryPath: String): void + + getPath(): String + + Reservation(type: String): Reservation + + WalkFileSystemTree(manager: AccomodationManager, rootDir: Path): void + + LoadAccount(file: Path): Account + - loadReservationRefList(rdr: JsonReader, ac: Account): void + - loadReservation(ac: Account, reservationType: String, reservationNumber: String): void - - -AccomodationManager - -AccomodationManager - -- accounts: AccountList - -+ loadAll(): void -+ load(Path): void -+ retrieveLoadedAccounts(): List<Account> -+ retrieveAccount(String): Account -+ AddAccount(Account): void -+ UpdateAccount(Account): void -+ newAccount(String, Address, EmailAddress): Account -+ addReservation(Account, Reservation): boolean -+ findReservation(String): Reservation -+ getReservationList(): List<? extends IReservation> -+ showReservationList(): void + + +DataRepository->Account + + +creates - - -DataRepository->AccomodationManager - - - - - -KitchenTypeEnum - -«enumeration» -KitchenTypeEnum - -None -Kitchenette -FullKitchen - - - -ReservationStatusEnum - -«enumeration» -ReservationStatusEnum - -Draft -Canceled -Completed - - - -IllegalOperationException - -IllegalOperationException - -+ IllegalOperationException() -+ IllegalOperationException(String) + + +DataRepository->DataRepository + + +singleton Reservation - -«abstract» -Reservation - -# type: char -# reservation_number: String -# physical_address: Address -# mailing_address: Address -# reservation_start_date: ZonedDateTime -# reservation_end_date: ZonedDateTime -# reservation_status: ReservationStatusEnum -# kitchen: KitchenTypeEnum -# numberOfBeds: Integer -# numberOfBedRooms: Integer -# numberOfBathRooms: Integer -# numberOfFloors: Integer -# squareFeet: Integer -# price: Float -# accountNumber: String - -+ getReservation_number(): String -+ setReservation_number(String): void -+ getAccountNumber(): String -+ setAccountNumber(String): void -+ getPhysical_address(): Address -+ setPhysical_address(Address): void -+ Write(Reservation): void -+ Change(Reservation, ReservationStatusEnum): void -+ update(Reservation): void -+ ReservationType(): String + +Reservation + + + +DataRepository->Reservation + + +creates + + + +AccomodationManager + +AccomodationManager + +- accounts: AccountList + ++ AccomodationManager(home: String) + + setDataStoreRoot(home: String): void + + loadAll(): void + + load(file: Path): void + + retrieveLoadedAccounts(): List<Account> + + retrieveAccount(acct_id: String): Account + + AddAccount(acct: Account): void + + UpdateAccount(acct: Account): void + + newAccount(phone_number, mailing_address, email_address): Account + + addReservation(account: Account, reservation: Reservation): boolean + + findReservation(reservation_number: String): Reservation + + getReservationList(): List<? extends IReservation> + + showReservationList(): void + + + +DataRepository->AccomodationManager + + +uses + + + +KitchenTypeEnum + +«enumeration» +KitchenTypeEnum + +None + Kitchenette + FullKitchen + + + +ReservationStatusEnum + +«enumeration» +ReservationStatusEnum + +Draft + Canceled + Completed + + + +DuplicateObjectException + +DuplicateObjectException + + + ++ DuplicateObjectException() + + DuplicateObjectException(message: String) + + + +RuntimeException + +RuntimeException + + + +DuplicateObjectException->RuntimeException + + + + + +IllegalOperationException + +IllegalOperationException + + + ++ IllegalOperationException() + + IllegalOperationException(message: String) + + + +IllegalOperationException->RuntimeException + + - + Reservation->Address - - -1 + + +uses - + Reservation->KitchenTypeEnum - - + + +uses - + Reservation->ReservationStatusEnum - - - - - -Reservation->IllegalOperationException - - + + +uses - + Reservation->IReservation - - -implements - - - -ZonedDateTime - -ZonedDateTime - - - -Reservation->ZonedDateTime - - + + - + AccomodationManager->AccountList - - -1 - - - -AccomodationManager->DataRepository - - - - - -AccomodationManager->Reservation - - + + +1 HotelReservation - -HotelReservation - -extends Reservation - -+ HotelReservation() -+ HotelReservation(Address) -+ copy(String): Reservation -+ ReservationType(): String -+ checkValid(): boolean -+ getPricePerNight(): float -+ calculatePrice(): float + +HotelReservation + + + ++ HotelReservation() + + HotelReservation(physical_address: Address) + + copy(reservationType: String): Reservation + + ReservationType(): String + + checkValid(): boolean + + getPricePerNight(): float + + calculatePrice(): float - + HotelReservation->Reservation - - -extends - - - -CabinReservation - -CabinReservation - -extends Reservation - -+ CabinReservation() -+ CabinReservation(Address) -+ ReservationType(): String -+ checkValid(): boolean -+ getPricePerNight(): float -+ calculatePrice(): float - - - -CabinReservation->Reservation - - -extends + + - + HouseReservation - -HouseReservation - -extends Reservation - -+ HouseReservation() -+ HouseReservation(Address) -+ copy(String): Reservation -+ ReservationType(): String -+ checkValid(): boolean -+ getPricePerNight(): float -+ calculatePrice(): float + +HouseReservation + + + ++ HouseReservation() + + HouseReservation(physical_address: Address) + + copy(reservationType: String): Reservation + + ReservationType(): String + + checkValid(): boolean + + getPricePerNight(): float + + calculatePrice(): float - + HouseReservation->Reservation - - -extends + + + + + +CabinReservation + +CabinReservation + + + ++ CabinReservation() + + CabinReservation(physical_address: Address) + + ReservationType(): String + + checkValid(): boolean + + getPricePerNight(): float + + calculatePrice(): float + + + +CabinReservation->Reservation + + TestReservations - -TestReservations - -+ main(String[]): void + +TestReservations + + + ++ main(args: String[]): void - + TestReservations->AccomodationManager - - + + +uses - - -TestReservations->HotelReservation - - + + +getRepositoryConfig + +getRepositoryConfig + + + ++ getPath(): String - - -TestReservations->CabinReservation - - - - - -TestReservations->HouseReservation - - + + +TestReservations->getRepositoryConfig + + +uses