diff --git a/sdd/Software Detail Design Template.docx b/sdd/Software Detail Design Template.docx deleted file mode 100644 index c72fc34..0000000 Binary files a/sdd/Software Detail Design Template.docx and /dev/null differ diff --git a/sdd/readme.docx b/sdd/readme.docx index 9885277..1d3d478 100644 Binary files a/sdd/readme.docx and b/sdd/readme.docx differ diff --git a/src/resources/acc-A1450981765.json b/src/resources/acc-A1450981765.json index 84ff47e..d5e1691 100644 --- a/src/resources/acc-A1450981765.json +++ b/src/resources/acc-A1450981765.json @@ -1 +1,36 @@ -{ "Account":{"account_number": "A1450981765","phone_number": "701-456-7890","mailing_address": { "Address":{"street": "10 wilco ave","city": "wilco","state": "WY","zip": "82801"}},"email_address": { "EmailAddress":{"email": "wilco@wyommin.net"}},"reservations":[{"HotelReservation":{"reservation_number":"R0123077641"}},{"CabinReservation":{"reservation_number":"R0535276622"}},{"HouseReservation":{"reservation_number":"R0499811708"}}]}} \ No newline at end of file +{ + "Account": { + "account_number": "A1450981765", + "phone_number": "701-456-7890", + "mailing_address": { + "Address": { + "street": "10 wilco ave", + "city": "wilco", + "state": "WY", + "zip": "82801" + } + }, + "email_address": { + "EmailAddress": { + "email": "wilco@wyommin.net" + } + }, + "reservations": [ + { + "HotelReservation": { + "reservation_number": "R0123077641" + } + }, + { + "CabinReservation": { + "reservation_number": "R0535276622" + } + }, + { + "HouseReservation": { + "reservation_number": "R0499811708" + } + } + ] + } +} \ No newline at end of file diff --git a/uml/classdiagram.dot b/uml/classdiagram.dot index a47a68b..8aa62f5 100644 --- a/uml/classdiagram.dot +++ b/uml/classdiagram.dot @@ -25,10 +25,10 @@ digraph LodgeReservationSystem { IllegalOperationException [label="{IllegalOperationException|extends RuntimeException|+ IllegalOperationException()\l+ IllegalOperationException(String)\l}"]; - subgraph cluster_reservation { + subgraph cluster_account { label="lodge.reservation"; style=filled; - color=lightblue; + color="#e9d5ba"; 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(String, String, Address, EmailAddress)\l+ Account(String, Address, EmailAddress)\l+ add(Reservation): boolean\l+ findReservation(String): Reservation\l+ getAllReservations(): ListIterator\\l+ update(Account): void\l+ toString(): String\l+ static Write(Account): void\l}"]; AccountList [label="{AccountList|extends ArrayList\|+ static accountSerial(...): String\l+ add(Account): boolean\l+ save(Account): void\l+ find(String): Account\l+ getListOfReservations(): List\\l+ showReservationList(): void\l}"]; @@ -89,7 +89,7 @@ digraph LodgeReservationSystem { Account -> AccountReservationList [arrowhead=diamond, label="contains"]; Account -> Address [arrowhead=diamond, label="mailing_address"]; Account -> EmailAddress [arrowhead=diamond, label="email_address"]; - AccountList -> Account [arrowhead=odiamond, label="contains"]; + AccountList -> Account [arrowhead=odiamond, label="contains 0..*"]; AccountReservationList -> IReservation [arrowhead=odiamond, label="contains 0..*"]; Reservation -> Address [arrowhead=diamond, label="physical_address\nmailing_address"]; Reservation -> KitchenTypeEnum [arrowhead=diamond, label="kitchen"]; diff --git a/uml/classdiagram.svg b/uml/classdiagram.svg index 157105e..d7c043c 100644 --- a/uml/classdiagram.svg +++ b/uml/classdiagram.svg @@ -1,469 +1,468 @@ - - - - - - -LodgeReservationSystem - - -cluster_data - -lodge.data + + + + + + + + +lodge.data - -cluster_reservation - -lodge.reservation + + + +lodge.reservation - -cluster_reservationsystem - -lodge.reservationsystem + + + +lodge.reservation - -cluster_lodge - -lodge + + + +lodge.reservationsystem + + + + +lodge - -Address - -Address - -+ street: String -+ city: String -+ state: String -+ zip: String - -+ Address(String, String, String, String) -+ getters/setters -+ hashCode(): int -+ equals(Object): boolean -+ toString(): String + + + +Address + ++ street: String ++ city: String ++ state: String ++ zip: String + ++ Address(String, String, String, String) ++ getters/setters ++ hashCode(): int ++ equals(Object): boolean ++ toString(): String - -EmailAddress - -EmailAddress - -+ email_address: String - -+ EmailAddress(String) -+ getEmail_address(): String -+ setEmail_address(String): void -+ hashCode(): int -+ equals(Object): boolean -+ toString(): String + + + +EmailAddress + ++ email_address: String + ++ EmailAddress(String) ++ getEmail_address(): String ++ setEmail_address(String): void ++ hashCode(): int ++ equals(Object): boolean ++ toString(): String - -KitchenTypeEnum - -KitchenTypeEnum - -<<enumeration>> - -None -Kitchenette -FullKitchen + + + +KitchenTypeEnum + +<<enumeration>> + +None +Kitchenette +FullKitchen - -ReservationStatusEnum - -ReservationStatusEnum - -<<enumeration>> - -Draft -Canceled -Completed + + + +ReservationStatusEnum + +<<enumeration>> + +Draft +Canceled +Completed - -DuplicateObjectException - -DuplicateObjectException - -extends RuntimeException - -+ DuplicateObjectException() -+ DuplicateObjectException(String) + + + +DuplicateObjectException + +extends RuntimeException + ++ DuplicateObjectException() ++ DuplicateObjectException(String) - -IllegalOperationException - -IllegalOperationException - -extends RuntimeException - -+ IllegalOperationException() -+ IllegalOperationException(String) + + + +IllegalOperationException + +extends RuntimeException + ++ IllegalOperationException() ++ IllegalOperationException(String) - -Account - -Account - -+ account_number: String -+ phone_number: String -+ mailing_address: Address -+ email_address: EmailAddress -- reservations: AccountReservationList - -+ Account() -+ Account(String, String, Address, EmailAddress) -+ Account(String, Address, EmailAddress) -+ add(Reservation): boolean -+ findReservation(String): Reservation -+ getAllReservations(): ListIterator<IReservation> -+ update(Account): void -+ toString(): String -+ static Write(Account): void + + + +Account + ++ account_number: String ++ phone_number: String ++ mailing_address: Address ++ email_address: EmailAddress +- reservations: AccountReservationList + ++ Account() ++ Account(String, String, Address, EmailAddress) ++ Account(String, Address, EmailAddress) ++ add(Reservation): boolean ++ findReservation(String): Reservation ++ getAllReservations(): ListIterator<IReservation> ++ update(Account): void ++ toString(): String ++ static Write(Account): void - -Account->Address - - -mailing_address + + + + +mailing_address - -Account->EmailAddress - - -email_address + + + + +email_address - -AccountReservationList - -AccountReservationList - -extends ArrayList<IReservation> - -- static reservationSerial(Reservation): String -+ add(IReservation): boolean -+ find(String): Reservation -+ update(AccountReservationList): void -+ toString(): String + + + +AccountReservationList + +extends ArrayList<IReservation> + +- static reservationSerial(Reservation): String ++ add(IReservation): boolean ++ find(String): Reservation ++ update(AccountReservationList): void ++ toString(): String - -Account->AccountReservationList - - -contains + + + + +contains - -AccountList - -AccountList - -extends ArrayList<Account> - -+ static accountSerial(...): String -+ add(Account): boolean -+ save(Account): void -+ find(String): Account -+ getListOfReservations(): List<? extends IReservation> -+ showReservationList(): void + + + +AccountList + +extends ArrayList<Account> + ++ static accountSerial(...): String ++ add(Account): boolean ++ save(Account): void ++ find(String): Account ++ getListOfReservations(): List<? extends IReservation> ++ showReservationList(): void - -AccountList->Account - - -contains + + + + +contains 0..* - -IReservation - -IReservation - -<<interface>> - -+ ReservationType(): String -+ static copy(String): Reservation -+ getReservation_number(): String -+ getAccountNumber(): String -+ getPhysical_address(): Address -+ getPricePerNight(): float -+ calculatePrice(): float -+ checkValid(): boolean + + + +IReservation + +<<interface>> + ++ ReservationType(): String ++ static copy(String): Reservation ++ getReservation_number(): String ++ getAccountNumber(): String ++ getPhysical_address(): Address ++ getPricePerNight(): float ++ calculatePrice(): float ++ checkValid(): boolean - -Reservation - -Reservation - -<<abstract>> - -# 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 - -# Reservation() -+ getters/setters -+ Write(Reservation): void -+ Change(Reservation, ReservationStatusEnum): void -+ update(Reservation): void -+ abstract ReservationType(): String + + + +Reservation + +<<abstract>> + +# 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 + +# Reservation() ++ getters/setters ++ Write(Reservation): void ++ Change(Reservation, ReservationStatusEnum): void ++ update(Reservation): void ++ abstract ReservationType(): String - -Reservation->Address - - -physical_address -mailing_address + + + + +physical_address +mailing_address - -Reservation->KitchenTypeEnum - - -kitchen + + + + +kitchen - -Reservation->ReservationStatusEnum - - -reservation_status + + + + +reservation_status - -Reservation->IllegalOperationException - - -throws + + + + +throws - -Reservation->IReservation - - -implements + + + + +implements - -AccountReservationList->DuplicateObjectException - - -throws + + + + +throws - -AccountReservationList->IReservation - - -contains 0..* + + + + +contains 0..* - -CabinReservation - -CabinReservation - -+ CabinReservation() -+ CabinReservation(Address) -+ ReservationType(): String -+ checkValid(): boolean -+ getPricePerNight(): float -+ calculatePrice(): float + + + +CabinReservation + ++ CabinReservation() ++ CabinReservation(Address) ++ ReservationType(): String ++ checkValid(): boolean ++ getPricePerNight(): float ++ calculatePrice(): float - -CabinReservation->Reservation - - -extends + + + + +extends - -HotelReservation - -HotelReservation - -+ HotelReservation() -+ HotelReservation(Address) -+ static copy(String): Reservation -+ ReservationType(): String -+ checkValid(): boolean -+ getPricePerNight(): float -+ calculatePrice(): float + + + +HotelReservation + ++ HotelReservation() ++ HotelReservation(Address) ++ static copy(String): Reservation ++ ReservationType(): String ++ checkValid(): boolean ++ getPricePerNight(): float ++ calculatePrice(): float - -HotelReservation->Reservation - - -extends + + + + +extends - -HouseReservation - -HouseReservation - -+ HouseReservation() -+ HouseReservation(Address) -+ static copy(String): Reservation -+ ReservationType(): String -+ checkValid(): boolean -+ getPricePerNight(): float -+ calculatePrice(): float + + + +HouseReservation + ++ HouseReservation() ++ HouseReservation(Address) ++ static copy(String): Reservation ++ ReservationType(): String ++ checkValid(): boolean ++ getPricePerNight(): float ++ calculatePrice(): float - -HouseReservation->Reservation - - -extends + + + + +extends - -AccomodationManager - -AccomodationManager - -- accounts: AccountList - -+ AccomodationManager(String) -+ setDataStoreRoot(String): void -+ loadAll(): void -+ load(Path): void -+ retrieveLoadedAccounts(): List<Account> -+ retrieveAccount(String): Account -+ AddAccount(Account): void -+ UpdateAccount(Account): void -+ newAccount(...): Account -+ addReservation(Account, Reservation): boolean -+ findReservation(String): Reservation -+ getReservationList(): List<? extends IReservation> -+ showReservationList(): void + + + +AccomodationManager + +- accounts: AccountList + ++ AccomodationManager(String) ++ setDataStoreRoot(String): void ++ loadAll(): void ++ load(Path): void ++ retrieveLoadedAccounts(): List<Account> ++ retrieveAccount(String): Account ++ AddAccount(Account): void ++ UpdateAccount(Account): void ++ newAccount(...): Account ++ addReservation(Account, Reservation): boolean ++ findReservation(String): Reservation ++ getReservationList(): List<? extends IReservation> ++ showReservationList(): void - -AccomodationManager->AccountList - - -accounts + + + + +accounts - -DataRepository - -DataRepository - -<<singleton>> - -- directoryPath: String -- static instance: DataRepository - -+ static getInstance(): DataRepository -+ static setDataStoreRoot(String): void -+ static getPath(): String -+ static Reservation(String): Reservation -+ static WalkFileSystemTree(...): void -+ static LoadAccount(Path): Account + + + +DataRepository + +<<singleton>> + +- directoryPath: String +- static instance: DataRepository + ++ static getInstance(): DataRepository ++ static setDataStoreRoot(String): void ++ static getPath(): String ++ static Reservation(String): Reservation ++ static WalkFileSystemTree(...): void ++ static LoadAccount(Path): Account - -AccomodationManager->DataRepository - - -uses + + + + +uses - -DataRepository->Account - - -creates + + + + +creates - -DataRepository->CabinReservation - - -creates + + + + +creates - -DataRepository->HotelReservation - - -creates + + + + +creates - -DataRepository->HouseReservation - - -creates + + + + +creates - -TestReservations - -TestReservations - -+ static main(String[]): void -+ static class getRepositoryConfig + + + +TestReservations + ++ static main(String[]): void ++ static class getRepositoryConfig - -TestReservations->CabinReservation - - -creates + + + + +creates - -TestReservations->HotelReservation - - -creates + + + + +creates - -TestReservations->HouseReservation - - -creates + + + + +creates - -TestReservations->AccomodationManager - - -uses + + + + +uses - + \ No newline at end of file