This commit is contained in:
2025-09-29 09:59:37 -04:00
parent b02c9546d9
commit 6cabfec4e9
31 changed files with 1023 additions and 74 deletions

View File

@@ -1,3 +0,0 @@
{
"java.configuration.updateBuildConfiguration": "interactive"
}

View File

@@ -11,14 +11,27 @@ plugins {
id 'application' id 'application'
} }
// Apply a specific Java toolchain to ease working on different environments.
java {
toolchain {
languageVersion = JavaLanguageVersion.of(24)
}
}
application { application {
mainClass = 'lodge.TestReservations' mainClass = 'lodge.TestReservations'
applicationDefaultJvmArgs = ["--add-opens", "java.base/jdk.internal.loader=ALL-UNNAMED"]
} }
sourceSets { sourceSets {
main { main {
java { java {
srcDirs = ['src/java'] srcDirs = ['src/main/java']
}
}
test {
java {
srcDirs = ['src/test/java']
} }
runtimeClasspath = files("$projectDir/libs/*.jars") runtimeClasspath = files("$projectDir/libs/*.jars")
} }
@@ -30,6 +43,8 @@ repositories {
} }
dependencies { dependencies {
//https://mvnrepository.com/artifact/com.google.code.gson/gson
implementation 'com.google.code.gson:gson:2.13.2' implementation 'com.google.code.gson:gson:2.13.2'
} }
@@ -46,4 +61,4 @@ tasks.named('jar') {
'Main-Class': 'lodge.TestReservations', 'Main-Class': 'lodge.TestReservations',
'Class-Path': 'lodge.reservationsystem com.google.gson .' ) 'Class-Path': 'lodge.reservationsystem com.google.gson .' )
} }
} }

Binary file not shown.

BIN
sdd/ui-idea1.pptx Normal file

Binary file not shown.

View File

@@ -5,9 +5,9 @@
package lodge; package lodge;
import lodge.data.Account; import lodge.datamodel.Account;
import lodge.data.Address; import lodge.datamodel.Address;
import lodge.data.EmailAddress; import lodge.datamodel.EmailAddress;
import lodge.reservationsystem.AccomodationManager; import lodge.reservationsystem.AccomodationManager;
/** /**

View File

@@ -9,18 +9,17 @@ import java.time.ZoneId;
import java.time.ZonedDateTime; import java.time.ZonedDateTime;
import java.time.temporal.ChronoUnit; import java.time.temporal.ChronoUnit;
import lodge.data.Account; import lodge.datamodel.Account;
import lodge.data.Address; import lodge.datamodel.Address;
import lodge.data.DuplicateObjectException; import lodge.datamodel.DuplicateObjectException;
import lodge.data.EmailAddress; import lodge.datamodel.EmailAddress;
import lodge.data.ReservationStatusEnum; import lodge.datamodel.IReservation;
import lodge.reservation.IReservation; import lodge.datamodel.Reservation;
import lodge.reservation.Reservation; import lodge.datamodel.ReservationStatusEnum;
import lodge.reservationsystem.AccomodationManager; import lodge.reservationsystem.AccomodationManager;
import lodge.reservationsystem.CabinReservation; import lodge.reservationsystem.CabinReservation;
import lodge.reservationsystem.HotelReservation; import lodge.reservationsystem.HotelReservation;
import lodge.reservationsystem.HouseReservation; import lodge.reservationsystem.HouseReservation;
/** /**
* The Tests for the ReservationSystem Module * The Tests for the ReservationSystem Module
* *
@@ -58,7 +57,6 @@ public final class TestReservations {
mgr.UpdateAccount(acct); mgr.UpdateAccount(acct);
} }
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
// Configure data repository // Configure data repository

View File

@@ -2,7 +2,7 @@
* license: GPLv3 * license: GPLv3
* lodge.reservationsystem * lodge.reservationsystem
*/ */
package lodge.data; package lodge.datamodel;
import java.io.BufferedWriter; import java.io.BufferedWriter;
import java.io.IOException; import java.io.IOException;
@@ -12,9 +12,8 @@ import java.nio.file.Path;
import java.nio.file.Paths; import java.nio.file.Paths;
import java.util.ListIterator; import java.util.ListIterator;
import lodge.reservation.IReservation;
import lodge.reservation.Reservation;
import lodge.reservationsystem.DataRepository; import lodge.reservationsystem.DataRepository;
/** /**
* Concrete account data class for account json storage record. * Concrete account data class for account json storage record.
* Collects account attributes, and hash instance to enforce uniqueness. * Collects account attributes, and hash instance to enforce uniqueness.
@@ -41,11 +40,25 @@ public class Account {
this.email_address = email_address; this.email_address = email_address;
} }
public Account(String phone_number, Address mailing_address, EmailAddress email_address) { public Account(String phone_number, Address mailing_address, EmailAddress email_address)
this(AccountList.accountSerial(phone_number, mailing_address, email_address), throws IllegalArgumentException {
phone_number, if (phone_number == null) {
mailing_address, throw new IllegalArgumentException(String.format("%s %s", "Account: requires phone number",
email_address); mailing_address.toString()));
}
if (mailing_address == null) {
throw new IllegalArgumentException(String.format("%s %s", "Account: requires mailing address",
phone_number.substring(phone_number.length() - 4)));
}
if (email_address == null) {
throw new IllegalArgumentException(String.format("%s %s", "Account: requires phone number",
mailing_address.toString()));
}
this.account_number = AccountList.accountSerial(phone_number, mailing_address, email_address);
this.phone_number = phone_number;
this.mailing_address = mailing_address;
this.email_address = email_address;
} }
@Override @Override
@@ -157,6 +170,22 @@ public class Account {
return true; return true;
} }
public boolean checkValid() throws IllegalArgumentException {
if (email_address == null) {
throw new IllegalArgumentException(
String.format("not valid, email_address %s", this.getAccount_number()));
}
if (phone_number == null) {
throw new IllegalArgumentException(
String.format("not valid, phone_number: %s", this.getAccount_number()));
}
if (getMailing_address() == null) {
throw new IllegalArgumentException(
String.format("not valid, mailing_address: %s", this.getAccount_number()));
}
return true;
}
public void update(Account acct) { public void update(Account acct) {
this.setEmail_address(acct.email_address); this.setEmail_address(acct.email_address);
this.setPhone_number(acct.phone_number); this.setPhone_number(acct.phone_number);

View File

@@ -2,7 +2,7 @@
* license: GPLv3 * license: GPLv3
* lodge.reservationsystem * lodge.reservationsystem
*/ */
package lodge.data; package lodge.datamodel;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
@@ -10,8 +10,6 @@ import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.ListIterator; import java.util.ListIterator;
import lodge.reservation.IReservation;
public class AccountList extends ArrayList<Account> { public class AccountList extends ArrayList<Account> {
public static String accountSerial(String phone_number, Address mailing_address, EmailAddress email_address) { public static String accountSerial(String phone_number, Address mailing_address, EmailAddress email_address) {

View File

@@ -2,13 +2,10 @@
* license: GPLv3 * license: GPLv3
* lodge.reservationsystem * lodge.reservationsystem
*/ */
package lodge.data; package lodge.datamodel;
import java.util.ArrayList; import java.util.ArrayList;
import lodge.reservation.IReservation;
import lodge.reservation.Reservation;
class AccountReservationList extends ArrayList<IReservation> { class AccountReservationList extends ArrayList<IReservation> {
private static String reservationSerial(Reservation reservation) { private static String reservationSerial(Reservation reservation) {

View File

@@ -2,7 +2,7 @@
* license: GPLv3 * license: GPLv3
* lodge.reservationsystem * lodge.reservationsystem
*/ */
package lodge.data; package lodge.datamodel;
public final class Address{ public final class Address{

View File

@@ -2,7 +2,7 @@
* license: GPLv3 * license: GPLv3
* lodge.reservationsystem * lodge.reservationsystem
*/ */
package lodge.data; package lodge.datamodel;
public class DuplicateObjectException extends RuntimeException { public class DuplicateObjectException extends RuntimeException {
public DuplicateObjectException() { public DuplicateObjectException() {

View File

@@ -2,7 +2,7 @@
* license: GPLv3 * license: GPLv3
* lodge.reservationsystem * lodge.reservationsystem
*/ */
package lodge.data; package lodge.datamodel;
public class EmailAddress{ public class EmailAddress{
String email_address; String email_address;

View File

@@ -1,6 +1,4 @@
package lodge.reservation; package lodge.datamodel;
import lodge.data.Address;
public interface IReservation { public interface IReservation {

View File

@@ -2,7 +2,7 @@
* license: GPLv3 * license: GPLv3
* lodge.reservationsystem * lodge.reservationsystem
*/ */
package lodge.data; package lodge.datamodel;
public class IllegalOperationException extends RuntimeException { public class IllegalOperationException extends RuntimeException {
public IllegalOperationException () { public IllegalOperationException () {

View File

@@ -2,7 +2,7 @@
* license: GPLv3 * license: GPLv3
* lodge.reservationsystem * lodge.reservationsystem
*/ */
package lodge.data; package lodge.datamodel;
public enum KitchenTypeEnum { public enum KitchenTypeEnum {
None, Kitchenette, FullKitchen; None, Kitchenette, FullKitchen;

View File

@@ -2,7 +2,7 @@
* license: GPLv3 * license: GPLv3
* lodge.reservationsystem * lodge.reservationsystem
*/ */
package lodge.reservation; package lodge.datamodel;
import java.io.BufferedWriter; import java.io.BufferedWriter;
import java.io.IOException; import java.io.IOException;
@@ -12,10 +12,6 @@ import java.nio.file.Path;
import java.nio.file.Paths; import java.nio.file.Paths;
import java.time.ZonedDateTime; import java.time.ZonedDateTime;
import lodge.data.Address;
import lodge.data.IllegalOperationException;
import lodge.data.KitchenTypeEnum;
import lodge.data.ReservationStatusEnum;
import lodge.reservationsystem.DataRepository; import lodge.reservationsystem.DataRepository;
public abstract class Reservation implements IReservation{ public abstract class Reservation implements IReservation{

View File

@@ -2,7 +2,7 @@
* license: GPLv3 * license: GPLv3
* lodge.reservationsystem * lodge.reservationsystem
*/ */
package lodge.data; package lodge.datamodel;
public enum ReservationStatusEnum { public enum ReservationStatusEnum {
Draft, Draft,

View File

@@ -4,17 +4,20 @@
*/ */
package lodge.reservationsystem; package lodge.reservationsystem;
import java.io.IOException;
import java.nio.file.Path; import java.nio.file.Path;
import java.nio.file.Paths; import java.nio.file.Paths;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import lodge.data.Account; import lodge.datamodel.Account;
import lodge.data.AccountList; import lodge.datamodel.AccountList;
import lodge.data.Address; import lodge.datamodel.Address;
import lodge.data.EmailAddress; import lodge.datamodel.DuplicateObjectException;
import lodge.reservation.IReservation; import lodge.datamodel.EmailAddress;
import lodge.reservation.Reservation; import lodge.datamodel.IReservation;
import lodge.datamodel.IllegalOperationException;
import lodge.datamodel.Reservation;
public final class AccomodationManager { public final class AccomodationManager {
@@ -33,7 +36,7 @@ public final class AccomodationManager {
DataRepository.setDataStoreRoot(home); DataRepository.setDataStoreRoot(home);
} }
public final void loadAll() throws Exception { public final void loadAll()throws IOException,IllegalArgumentException,IllegalOperationException,DuplicateObjectException{
accounts.clear(); accounts.clear();
// walk directories // walk directories
Path rootDir = Paths.get(DataRepository.getPath()); Path rootDir = Paths.get(DataRepository.getPath());
@@ -42,12 +45,13 @@ public final class AccomodationManager {
} }
// Load / Deserialize Account // Load / Deserialize Account
protected void load(Path file) throws Exception { protected void load(Path file) throws IOException,IllegalArgumentException,IllegalOperationException,DuplicateObjectException {
Account account = DataRepository.LoadAccount(file); Account account = DataRepository.LoadAccount(file);
if (account == null) { if (account == null) {
System.out.println(String.format("%s", file.toString())); System.out.println(String.format("No Account: %s", file.toString()));
} else { } else {
account.checkValid();
accounts.add(account); accounts.add(account);
} }
} }

View File

@@ -7,9 +7,9 @@ package lodge.reservationsystem;
import java.time.ZonedDateTime; import java.time.ZonedDateTime;
import java.time.temporal.ChronoUnit; import java.time.temporal.ChronoUnit;
import lodge.data.Address; import lodge.datamodel.Address;
import lodge.data.KitchenTypeEnum; import lodge.datamodel.KitchenTypeEnum;
import lodge.reservation.Reservation; import lodge.datamodel.Reservation;
/** /**
* Concrete reservation data class for reservation storage record * Concrete reservation data class for reservation storage record

View File

@@ -17,12 +17,13 @@ import java.nio.file.attribute.BasicFileAttributes;
import java.time.ZonedDateTime; import java.time.ZonedDateTime;
import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonReader;
import lodge.data.Address;
import lodge.data.EmailAddress; import lodge.datamodel.Account;
import lodge.data.Account; import lodge.datamodel.Address;
import lodge.data.KitchenTypeEnum; import lodge.datamodel.EmailAddress;
import lodge.data.ReservationStatusEnum; import lodge.datamodel.KitchenTypeEnum;
import lodge.reservation.Reservation; import lodge.datamodel.Reservation;
import lodge.datamodel.ReservationStatusEnum;
public final class DataRepository { public final class DataRepository {
// SINGLETON CLASS // SINGLETON CLASS
@@ -162,7 +163,7 @@ public final class DataRepository {
} }
private static void loadReservation(Account ac, String reservationType, private static void loadReservation(Account ac, String reservationType,
String reservationNumber) throws NullPointerException, IOException { String reservationNumber) throws IOException {
String filename = String.format("rsv-%s.json", reservationNumber); String filename = String.format("rsv-%s.json", reservationNumber);
Path basePath = Paths.get(getPath()); Path basePath = Paths.get(getPath());
Path resolvedPath = basePath.resolve(filename); Path resolvedPath = basePath.resolve(filename);

View File

@@ -8,9 +8,9 @@ import java.time.LocalTime;
import java.time.ZonedDateTime; import java.time.ZonedDateTime;
import java.time.temporal.ChronoUnit; import java.time.temporal.ChronoUnit;
import lodge.data.Address; import lodge.datamodel.Address;
import lodge.data.KitchenTypeEnum; import lodge.datamodel.KitchenTypeEnum;
import lodge.reservation.Reservation; import lodge.datamodel.Reservation;
/** /**
* Concrete reservation data class for reservation storage record * Concrete reservation data class for reservation storage record

View File

@@ -7,9 +7,9 @@ package lodge.reservationsystem;
import java.time.ZonedDateTime; import java.time.ZonedDateTime;
import java.time.temporal.ChronoUnit; import java.time.temporal.ChronoUnit;
import lodge.data.Address; import lodge.datamodel.Address;
import lodge.data.KitchenTypeEnum; import lodge.datamodel.KitchenTypeEnum;
import lodge.reservation.Reservation; import lodge.datamodel.Reservation;
/** /**
* Concrete reservation data class for reservation storage record * Concrete reservation data class for reservation storage record

View File

@@ -1 +1 @@
{ "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":[{"CabinReservation":{"reservation_number":"R0535276622"}},{"HouseReservation":{"reservation_number":"R0499811708"}}]}} { "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":[]}}

View File

@@ -1,8 +1,8 @@
digraph LodgeReservationSystem { digraph LodgeReservationSystem {
// Graph attributes // Graph attributes
rankdir=TB; rankdir=TB;
node [shape=record, fontname="Arial", fontsize=10]; node [shape=record, fontname="Times New Roman", fontsize=10];
edge [fontname="Arial", fontsize=9]; edge [fontname="Times New Roman", fontsize=9];
// Package clustering // Package clustering
subgraph cluster_data { subgraph cluster_data {

44
uml/classdiagram4.dot Normal file
View File

@@ -0,0 +1,44 @@
digraph ReservationsSystemSequence {
rankdir=TB;
splines=ortho;
node [shape=box, style=rounded];
actor -> "TestReservations" [label="main(args)"];
"TestReservations" -> "AccomodationManager" [label="1: new AccomodationManager(path)"];
"TestReservations" -> "AccomodationManager" [label="2: loadAll()"];
"AccomodationManager" -> "DataRepository" [label="3: WalkFileSystemTree(this, path)"];
"DataRepository" -> "AccomodationManager" [label="4: load(file)"];
"AccomodationManager" -> "DataRepository" [label="5: LoadAccount(file)"];
"DataRepository" -> "Account" [label="6: new Account()"];
"DataRepository" -> "DataRepository" [label="7: loadReservationRefList(jsonReader, account)"];
"DataRepository" -> "DataRepository" [label="8: loadReservation(account, type, number)"];
"DataRepository" -> "Reservation" [label="9: new [Hotel/Cabin/House]Reservation()"];
"DataRepository" -> "Account" [label="10: add(reservation)"];
"Account" -> "AccountReservationList" [label="11: add(reservation)"];
"DataRepository" -> "AccomodationManager" [label="12: return Account"];
"AccomodationManager" -> "AccountList" [label="13: add(account)"];
"TestReservations" -> "AccomodationManager" [label="14: newAccount(...)"];
"AccomodationManager" -> "Account" [label="15: new Account(...)"];
"TestReservations" -> "AccomodationManager" [label="16: AddAccount(account)"];
"AccomodationManager" -> "AccountList" [label="17: add(account)"];
"TestReservations" -> "AccomodationManager" [label="18: UpdateAccount(account)"];
"AccomodationManager" -> "Account" [label="19: Write(account)"];
"Account" -> "DataRepository" [label="20: getPath()"];
"Account" -> "Reservation" [label="21: Write(reservation)"];
"TestReservations" -> "Reservation" [label="22: new [Hotel/Cabin/House]Reservation()"];
"TestReservations" -> "AccomodationManager" [label="23: addReservation(account, reservation)"];
"AccomodationManager" -> "Account" [label="24: add(reservation)"];
"Account" -> "AccountReservationList" [label="25: add(reservation)"];
"TestReservations" -> "AccomodationManager" [label="26: UpdateAccount(account)"];
"AccomodationManager" -> "Account" [label="27: Write(account)"];
"TestReservations" -> "Reservation" [label="28: Change(reservation, newStatus)"];
"Reservation" -> "Reservation" [label="29: calculatePrice()"];
"TestReservations" -> "AccomodationManager" [label="30: UpdateAccount(account)"];
"TestReservations" -> "Reservation" [label="31: getPricePerNight()"];
"TestReservations" -> "Reservation" [label="32: calculatePrice()"];
}

65
uml/classdiagram5.dot Normal file
View File

@@ -0,0 +1,65 @@
digraph ReservationSystemClassDiagram {
rankdir=BT;
splines=ortho;
node [shape=record, style=rounded, fontname="Helvetica"];
edge [fontname="Helvetica"];
// --- Interfaces ---
IReservation [label="{«interface»\nIReservation|+ ReservationType()\l+ checkValid()\l+ calculatePrice()\l+ getPricePerNight()\l...}", style=dashed];
// --- Abstract Classes ---
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- price: Float\l- accountNumber: String\l|+ Write(Reservation)\l+ Change(Reservation, ReservationStatusEnum)\l+ ReservationType()\l...}"];
// --- Concrete Classes ---
TestReservations [label="{TestReservations|+ main(String[])\l- Test_AddAccount(...)\l- Test_AddReservation(...)\l}"];
AccomodationManager [label="{AccomodationManager|- accounts: AccountList\l|+ loadAll()\l+ retrieveAccount(String)\l+ AddAccount(Account)\l+ UpdateAccount(Account)\l+ newAccount(...)\l+ addReservation(Account, Reservation)\l...}"];
DataRepository [label="{DataRepository|- directoryPath: String\l- instance: DataRepository\l+ getInstance()\l+ WalkFileSystemTree(...)\l+ LoadAccount(Path)\l+ Reservation(String)\l...}"];
Account [label="{Account|- account_number: String\l- phone_number: String\l- mailing_address: Address\l- email_address: EmailAddress\l- reservations: AccountReservationList\l|+ add(Reservation)\l+ Write(Account)\l+ findReservation(String)\l...}"];
AccountList [label="{AccountList|+ add(Account)\l+ find(String)\l+ save(Account)\l...}"];
AccountReservationList [label="{AccountReservationList|+ add(IReservation)\l+ find(String)\l...}"];
HotelReservation [label="{HotelReservation|+ ReservationType()\l+ checkValid()\l+ calculatePrice()\l...}"];
CabinReservation [label="{CabinReservation|+ ReservationType()\l+ checkValid()\l+ calculatePrice()\l...}"];
HouseReservation [label="{HouseReservation|+ ReservationType()\l+ checkValid()\l+ calculatePrice()\l...}"];
Address [label="{Address|- street: String\l- city: String\l- state: String\l- zip: String\l}"];
EmailAddress [label="{EmailAddress|- email: String\l}"];
// --- Enums ---
ReservationStatusEnum [label="{«enumeration»\nReservationStatusEnum|Draft\lCompleted\lCanceled\l}", style=filled, fillcolor=lightgrey];
KitchenTypeEnum [label="{«enumeration»\nKitchenTypeEnum|None\lKitchenette\lFullKitchen\l}", style=filled, fillcolor=lightgrey];
// --- Inheritance & Implementation ---
edge [arrowhead=empty, style=solid];
HotelReservation -> Reservation;
CabinReservation -> Reservation;
HouseReservation -> Reservation;
edge [arrowhead=empty, style=dashed];
Reservation -> IReservation;
// --- Aggregation & Composition ---
edge [arrowhead=diamond, style=solid, label="1"];
AccomodationManager -> AccountList [label="1..*", headlabel="manages"];
Account -> AccountReservationList [label="1..*", headlabel="has"];
Account -> Address [label="1", headlabel="mailing"];
Account -> EmailAddress [label="1"];
Reservation -> Address [label="0..2", headlabel="physical/mailing"];
Reservation -> ReservationStatusEnum [label="1"];
Reservation -> KitchenTypeEnum [label="1"];
AccountReservationList -> IReservation [arrowhead=odiamond, label="0..*"];
AccountList -> Account [arrowhead=odiamond, label="0..*"];
// --- Dependencies ---
edge [arrowhead=vee, style=dashed, label="«uses»"];
TestReservations -> AccomodationManager;
TestReservations -> HotelReservation;
TestReservations -> CabinReservation;
TestReservations -> HouseReservation;
AccomodationManager -> DataRepository;
DataRepository -> AccomodationManager;
DataRepository -> Account;
DataRepository -> Reservation;
Account -> DataRepository;
Reservation -> DataRepository;
}

97
uml/classdiagram6.dot Normal file
View File

@@ -0,0 +1,97 @@
digraph "Reservation System" {
// General graph settings
graph [
rankdir="TB",
splines=ortho,
nodesep=1.0,
ranksep=1.0,
fontname="Arial",
fontsize=12
];
// General node and edge settings
node [
shape=record,
style=filled,
fillcolor=lightyellow,
fontname="Arial",
fontsize=10
];
edge [
fontname="Arial",
fontsize=9
];
// Packages
subgraph cluster_reservationsystem {
label="lodge.reservationsystem";
style=filled;
color=lightgrey;
AccomodationManager [label="{AccomodationManager|+ AccomodationManager(String)\l+ loadAll(): void\l+ retrieveAccount(String): Account\l+ retrieveLoadedAccounts(): AccountList\l+ newAccount(String, Address, EmailAddress): Account\l+ AddAccount(Account): void\l+ UpdateAccount(Account): void\l+ addReservation(Account, Reservation): boolean\l+ showReservationList(): void\l}"];
DataRepository [label="{DataRepository (Singleton)|- directoryPath: String\l- instance: DataRepository\l|+ getInstance(): DataRepository\l+ setDataStoreRoot(path: String)\l+ getPath(): String\l+ Reservation(type: String): Reservation\l+ WalkFileSystemTree(manager: AccomodationManager, rootDir: Path)\l+ LoadAccount(file: Path): Account\l- loadReservationRefList(rdr: JsonReader, ac: Account)\l- loadReservation(ac: Account, type: String, num: String)\l}"];
HotelReservation [label="{HotelReservation|+ HotelReservation(physicalAddress: Address)\l}"];
HouseReservation [label="{HouseReservation|+ HouseReservation(physicalAddress: Address)\l}"];
CabinReservation [label="{CabinReservation|+ CabinReservation(physicalAddress: Address)\l}"];
}
subgraph cluster_datamodel {
label="lodge.datamodel";
style=filled;
color=lightblue;
IReservation [label="<<interface>>\nIReservation"];
Reservation [label="{Reservation|+ Reservation()\l+ Reservation(physicalAddress: Address)\l+ Change(rsrv: Reservation, status: ReservationStatusEnum)\l+ update(rsrv: Reservation)\l+ calculatePrice(): float\l+ getPricePerNight(): float\l+ ReservationType(): String\l}"];
Account [label="{Account|+ Account()\l+ add(rsrv: Reservation)\l+ findReservation(reservationNumber: String): Reservation\l+ getAllReservations(): Iterator<IReservation>\l}"];
Address [label="{Address|+ Address(street: String, city: String, state: String, zip: String)\l}"];
EmailAddress [label="{EmailAddress|+ EmailAddress(email: String)\l}"];
ReservationStatusEnum [label="<<enum>>\nReservationStatusEnum|DRAFT\lCOMPLETED\lCANCELED\l"];
KitchenTypeEnum [label="<<enum>>\nKitchenTypeEnum|NONE\lPARTIAL\lFULL\l"];
DuplicateObjectException [label="<<exception>>\nDuplicateObjectException"];
}
subgraph cluster_test {
label="lodge (Test)";
style=filled;
color=honeydew;
TestReservations [label="{TestReservations|+ main(args: String[])\l}"];
}
// Relationships
AccomodationManager -> Account [label="manages"];
AccomodationManager -> Reservation [label="manages"];
AccomodationManager -> DataRepository [label="uses"];
DataRepository -> AccomodationManager [label="uses"];
DataRepository -> Reservation [label="creates"];
DataRepository -> HotelReservation [label="creates"];
DataRepository -> HouseReservation [label="creates"];
DataRepository -> CabinReservation [label="creates"];
DataRepository -> Account [label="loads/updates"];
TestReservations -> AccomodationManager [label="uses"];
TestReservations -> Account [label="uses"];
TestReservations -> HotelReservation [label="creates"];
TestReservations -> HouseReservation [label="creates"];
TestReservations -> CabinReservation [label="creates"];
Account -> IReservation [label="contains 0..*"];
Account -> Address [label="has mailing"];
Account -> EmailAddress [label="has"];
Reservation -> IReservation [style=dashed, arrowhead=empty, label="implements"];
Reservation -> Address [label="has physical/mailing"];
Reservation -> ReservationStatusEnum;
Reservation -> KitchenTypeEnum;
HotelReservation -> Reservation [style=dashed, arrowhead=empty, label="extends"];
HouseReservation -> Reservation [style=dashed, arrowhead=empty, label="extends"];
CabinReservation -> Reservation [style=dashed, arrowhead=empty, label="extends"];
// Exceptions
edge [color=red, style=dashed, arrowhead=open];
AccomodationManager -> DuplicateObjectException [label="<<throws>>"];
AccomodationManager -> Exception [label="<<throws>>"];
DataRepository -> IOException [label="<<throws>>"];
}

367
uml/classdiagram6.svg Normal file
View File

@@ -0,0 +1,367 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.42.4 (0)
-->
<!-- Title: Reservation System Pages: 1 -->
<svg width="2568pt" height="968pt"
viewBox="0.00 0.00 2568.00 968.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 964)">
<title>Reservation System</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-964 2564,-964 2564,4 -4,4"/>
<g id="clust1" class="cluster">
<title>cluster_reservationsystem</title>
<polygon fill="lightgrey" stroke="lightgrey" points="622,-317 622,-830 1452,-830 1452,-317 622,-317"/>
<text text-anchor="middle" x="1037" y="-816.4" font-family="Arial" font-size="12.00">lodge.reservationsystem</text>
</g>
<g id="clust2" class="cluster">
<title>cluster_datamodel</title>
<polygon fill="lightblue" stroke="lightblue" points="1152,-8 1152,-271 2182,-271 2182,-8 1152,-8"/>
<text text-anchor="middle" x="1667" y="-257.4" font-family="Arial" font-size="12.00">lodge.datamodel</text>
</g>
<g id="clust3" class="cluster">
<title>cluster_test</title>
<polygon fill="honeydew" stroke="honeydew" points="1858,-876 1858,-952 1984,-952 1984,-876 1858,-876"/>
<text text-anchor="middle" x="1921" y="-938.4" font-family="Arial" font-size="12.00">lodge (Test)</text>
</g>
<!-- AccomodationManager -->
<g id="node1" class="node">
<title>AccomodationManager</title>
<polygon fill="lightyellow" stroke="black" points="1184,-674.5 1184,-800.5 1444,-800.5 1444,-674.5 1184,-674.5"/>
<text text-anchor="middle" x="1314" y="-788.5" font-family="Arial" font-size="10.00">AccomodationManager</text>
<polyline fill="none" stroke="black" points="1184,-781.5 1444,-781.5 "/>
<text text-anchor="start" x="1192" y="-769.5" font-family="Arial" font-size="10.00">+ AccomodationManager(String)</text>
<text text-anchor="start" x="1192" y="-758.5" font-family="Arial" font-size="10.00">+ loadAll(): void</text>
<text text-anchor="start" x="1192" y="-747.5" font-family="Arial" font-size="10.00">+ retrieveAccount(String): Account</text>
<text text-anchor="start" x="1192" y="-736.5" font-family="Arial" font-size="10.00">+ retrieveLoadedAccounts(): AccountList</text>
<text text-anchor="start" x="1192" y="-725.5" font-family="Arial" font-size="10.00">+ newAccount(String, Address, EmailAddress): Account</text>
<text text-anchor="start" x="1192" y="-714.5" font-family="Arial" font-size="10.00">+ AddAccount(Account): void</text>
<text text-anchor="start" x="1192" y="-703.5" font-family="Arial" font-size="10.00">+ UpdateAccount(Account): void</text>
<text text-anchor="start" x="1192" y="-692.5" font-family="Arial" font-size="10.00">+ addReservation(Account, Reservation): boolean</text>
<text text-anchor="start" x="1192" y="-681.5" font-family="Arial" font-size="10.00">+ showReservationList(): void</text>
</g>
<!-- DataRepository -->
<g id="node2" class="node">
<title>DataRepository</title>
<polygon fill="lightyellow" stroke="black" points="630,-446.5 630,-591.5 956,-591.5 956,-446.5 630,-446.5"/>
<text text-anchor="middle" x="793" y="-579.5" font-family="Arial" font-size="10.00">DataRepository (Singleton)</text>
<polyline fill="none" stroke="black" points="630,-572.5 956,-572.5 "/>
<text text-anchor="start" x="638" y="-560.5" font-family="Arial" font-size="10.00">&#45; directoryPath: String</text>
<text text-anchor="start" x="638" y="-549.5" font-family="Arial" font-size="10.00">&#45; instance: DataRepository</text>
<polyline fill="none" stroke="black" points="630,-542.5 956,-542.5 "/>
<text text-anchor="start" x="638" y="-530.5" font-family="Arial" font-size="10.00">+ getInstance(): DataRepository</text>
<text text-anchor="start" x="638" y="-519.5" font-family="Arial" font-size="10.00">+ setDataStoreRoot(path: String)</text>
<text text-anchor="start" x="638" y="-508.5" font-family="Arial" font-size="10.00">+ getPath(): String</text>
<text text-anchor="start" x="638" y="-497.5" font-family="Arial" font-size="10.00">+ Reservation(type: String): Reservation</text>
<text text-anchor="start" x="638" y="-486.5" font-family="Arial" font-size="10.00">+ WalkFileSystemTree(manager: AccomodationManager, rootDir: Path)</text>
<text text-anchor="start" x="638" y="-475.5" font-family="Arial" font-size="10.00">+ LoadAccount(file: Path): Account</text>
<text text-anchor="start" x="638" y="-464.5" font-family="Arial" font-size="10.00">&#45; loadReservationRefList(rdr: JsonReader, ac: Account)</text>
<text text-anchor="start" x="638" y="-453.5" font-family="Arial" font-size="10.00">&#45; loadReservation(ac: Account, type: String, num: String)</text>
</g>
<!-- AccomodationManager&#45;&gt;DataRepository -->
<g id="edge3" class="edge">
<title>AccomodationManager&#45;&gt;DataRepository</title>
<path fill="none" stroke="black" d="M1195.25,-674.37C1195.25,-627.98 1195.25,-573 1195.25,-573 1195.25,-573 966.03,-573 966.03,-573"/>
<polygon fill="black" stroke="black" points="966.03,-569.5 956.03,-573 966.03,-576.5 966.03,-569.5"/>
<text text-anchor="middle" x="1015" y="-630.8" font-family="Arial" font-size="9.00">uses</text>
</g>
<!-- Reservation -->
<g id="node7" class="node">
<title>Reservation</title>
<polygon fill="lightyellow" stroke="black" points="1190,-137.5 1190,-241.5 1476,-241.5 1476,-137.5 1190,-137.5"/>
<text text-anchor="middle" x="1333" y="-229.5" font-family="Arial" font-size="10.00">Reservation</text>
<polyline fill="none" stroke="black" points="1190,-222.5 1476,-222.5 "/>
<text text-anchor="start" x="1198" y="-210.5" font-family="Arial" font-size="10.00">+ Reservation()</text>
<text text-anchor="start" x="1198" y="-199.5" font-family="Arial" font-size="10.00">+ Reservation(physicalAddress: Address)</text>
<text text-anchor="start" x="1198" y="-188.5" font-family="Arial" font-size="10.00">+ Change(rsrv: Reservation, status: ReservationStatusEnum)</text>
<text text-anchor="start" x="1198" y="-177.5" font-family="Arial" font-size="10.00">+ update(rsrv: Reservation)</text>
<text text-anchor="start" x="1198" y="-166.5" font-family="Arial" font-size="10.00">+ calculatePrice(): float</text>
<text text-anchor="start" x="1198" y="-155.5" font-family="Arial" font-size="10.00">+ getPricePerNight(): float</text>
<text text-anchor="start" x="1198" y="-144.5" font-family="Arial" font-size="10.00">+ ReservationType(): String</text>
</g>
<!-- AccomodationManager&#45;&gt;Reservation -->
<g id="edge2" class="edge">
<title>AccomodationManager&#45;&gt;Reservation</title>
<path fill="none" stroke="black" d="M1216.25,-674.37C1216.25,-674.37 1216.25,-251.83 1216.25,-251.83"/>
<polygon fill="black" stroke="black" points="1219.75,-251.83 1216.25,-241.83 1212.75,-251.83 1219.75,-251.83"/>
<text text-anchor="middle" x="2086.5" y="-402.8" font-family="Arial" font-size="9.00">manages</text>
</g>
<!-- Account -->
<g id="node8" class="node">
<title>Account</title>
<polygon fill="lightyellow" stroke="black" points="1911,-171.5 1911,-207.5 1965,-207.5 1965,-171.5 1911,-171.5"/>
<text text-anchor="middle" x="1938" y="-191.5" font-family="Arial" font-size="10.00">Account</text>
<polyline fill="none" stroke="black" points="1911,-180.5 1965,-180.5 "/>
</g>
<!-- AccomodationManager&#45;&gt;Account -->
<g id="edge1" class="edge">
<title>AccomodationManager&#45;&gt;Account</title>
<path fill="none" stroke="black" d="M1444.05,-724C1626.93,-724 1938,-724 1938,-724 1938,-724 1938,-217.59 1938,-217.59"/>
<polygon fill="black" stroke="black" points="1941.5,-217.59 1938,-207.59 1934.5,-217.59 1941.5,-217.59"/>
<text text-anchor="middle" x="2232.5" y="-402.8" font-family="Arial" font-size="9.00">manages</text>
</g>
<!-- DuplicateObjectException -->
<g id="node13" class="node">
<title>DuplicateObjectException</title>
<polygon fill="lightyellow" stroke="black" points="2044,-171.5 2044,-207.5 2174,-207.5 2174,-171.5 2044,-171.5"/>
<text text-anchor="middle" x="2109" y="-187" font-family="Arial" font-size="10.00">DuplicateObjectException</text>
</g>
<!-- AccomodationManager&#45;&gt;DuplicateObjectException -->
<g id="edge25" class="edge">
<title>AccomodationManager&#45;&gt;DuplicateObjectException</title>
<path fill="none" stroke="red" stroke-dasharray="5,2" d="M1444.39,-750C1669.93,-750 2109,-750 2109,-750 2109,-750 2109,-217.51 2109,-217.51"/>
<polygon fill="red" stroke="red" points="2109,-207.51 2113.5,-217.51 2109,-212.51 2109,-217.51 2109,-217.51 2109,-217.51 2109,-212.51 2104.5,-217.51 2109,-207.51 2109,-207.51"/>
<text text-anchor="middle" x="2383.5" y="-402.8" font-family="Arial" font-size="9.00">&lt;&lt;throws&gt;&gt;</text>
</g>
<!-- Exception -->
<g id="node15" class="node">
<title>Exception</title>
<polygon fill="lightyellow" stroke="black" points="1460,-501 1460,-537 1520,-537 1520,-501 1460,-501"/>
<text text-anchor="middle" x="1490" y="-516.5" font-family="Arial" font-size="10.00">Exception</text>
</g>
<!-- AccomodationManager&#45;&gt;Exception -->
<g id="edge26" class="edge">
<title>AccomodationManager&#45;&gt;Exception</title>
<path fill="none" stroke="red" stroke-dasharray="5,2" d="M1444.22,-699C1470.37,-699 1490,-699 1490,-699 1490,-699 1490,-547.25 1490,-547.25"/>
<polygon fill="red" stroke="red" points="1490,-537.25 1494.5,-547.25 1490,-542.25 1490,-547.25 1490,-547.25 1490,-547.25 1490,-542.25 1485.5,-547.25 1490,-537.25 1490,-537.25"/>
<text text-anchor="middle" x="1514.5" y="-630.8" font-family="Arial" font-size="9.00">&lt;&lt;throws&gt;&gt;</text>
</g>
<!-- DataRepository&#45;&gt;AccomodationManager -->
<g id="edge4" class="edge">
<title>DataRepository&#45;&gt;AccomodationManager</title>
<path fill="none" stroke="black" d="M956.1,-555C1069.54,-555 1200.5,-555 1200.5,-555 1200.5,-555 1200.5,-664.44 1200.5,-664.44"/>
<polygon fill="black" stroke="black" points="1197,-664.44 1200.5,-674.44 1204,-664.44 1197,-664.44"/>
<text text-anchor="middle" x="1218" y="-630.8" font-family="Arial" font-size="9.00">uses</text>
</g>
<!-- HotelReservation -->
<g id="node3" class="node">
<title>HotelReservation</title>
<polygon fill="lightyellow" stroke="black" points="629.5,-325.5 629.5,-363.5 850.5,-363.5 850.5,-325.5 629.5,-325.5"/>
<text text-anchor="middle" x="740" y="-351.5" font-family="Arial" font-size="10.00">HotelReservation</text>
<polyline fill="none" stroke="black" points="629.5,-344.5 850.5,-344.5 "/>
<text text-anchor="start" x="637.5" y="-332.5" font-family="Arial" font-size="10.00">+ HotelReservation(physicalAddress: Address)</text>
</g>
<!-- DataRepository&#45;&gt;HotelReservation -->
<g id="edge6" class="edge">
<title>DataRepository&#45;&gt;HotelReservation</title>
<path fill="none" stroke="black" d="M703.5,-446.26C703.5,-446.26 703.5,-373.7 703.5,-373.7"/>
<polygon fill="black" stroke="black" points="707,-373.7 703.5,-363.7 700,-373.7 707,-373.7"/>
<text text-anchor="middle" x="782.5" y="-402.8" font-family="Arial" font-size="9.00">creates</text>
</g>
<!-- HouseReservation -->
<g id="node4" class="node">
<title>HouseReservation</title>
<polygon fill="lightyellow" stroke="black" points="923,-325.5 923,-363.5 1149,-363.5 1149,-325.5 923,-325.5"/>
<text text-anchor="middle" x="1036" y="-351.5" font-family="Arial" font-size="10.00">HouseReservation</text>
<polyline fill="none" stroke="black" points="923,-344.5 1149,-344.5 "/>
<text text-anchor="start" x="931" y="-332.5" font-family="Arial" font-size="10.00">+ HouseReservation(physicalAddress: Address)</text>
</g>
<!-- DataRepository&#45;&gt;HouseReservation -->
<g id="edge7" class="edge">
<title>DataRepository&#45;&gt;HouseReservation</title>
<path fill="none" stroke="black" d="M939.5,-446.26C939.5,-446.26 939.5,-373.7 939.5,-373.7"/>
<polygon fill="black" stroke="black" points="943,-373.7 939.5,-363.7 936,-373.7 943,-373.7"/>
<text text-anchor="middle" x="971.5" y="-402.8" font-family="Arial" font-size="9.00">creates</text>
</g>
<!-- CabinReservation -->
<g id="node5" class="node">
<title>CabinReservation</title>
<polygon fill="lightyellow" stroke="black" points="1221.5,-325.5 1221.5,-363.5 1444.5,-363.5 1444.5,-325.5 1221.5,-325.5"/>
<text text-anchor="middle" x="1333" y="-351.5" font-family="Arial" font-size="10.00">CabinReservation</text>
<polyline fill="none" stroke="black" points="1221.5,-344.5 1444.5,-344.5 "/>
<text text-anchor="start" x="1229.5" y="-332.5" font-family="Arial" font-size="10.00">+ CabinReservation(physicalAddress: Address)</text>
</g>
<!-- DataRepository&#45;&gt;CabinReservation -->
<g id="edge8" class="edge">
<title>DataRepository&#45;&gt;CabinReservation</title>
<path fill="none" stroke="black" d="M956.04,-473C1114.94,-473 1332.75,-473 1332.75,-473 1332.75,-473 1332.75,-373.74 1332.75,-373.74"/>
<polygon fill="black" stroke="black" points="1336.25,-373.74 1332.75,-363.74 1329.25,-373.74 1336.25,-373.74"/>
<text text-anchor="middle" x="1173.5" y="-402.8" font-family="Arial" font-size="9.00">creates</text>
</g>
<!-- DataRepository&#45;&gt;Reservation -->
<g id="edge5" class="edge">
<title>DataRepository&#45;&gt;Reservation</title>
<path fill="none" stroke="black" d="M956.11,-459C1073.41,-459 1211,-459 1211,-459 1211,-459 1211,-251.78 1211,-251.78"/>
<polygon fill="black" stroke="black" points="1214.5,-251.78 1211,-241.78 1207.5,-251.78 1214.5,-251.78"/>
<text text-anchor="middle" x="15.5" y="-342.3" font-family="Arial" font-size="9.00">creates</text>
</g>
<!-- DataRepository&#45;&gt;Account -->
<g id="edge9" class="edge">
<title>DataRepository&#45;&gt;Account</title>
<path fill="none" stroke="black" d="M956.02,-486C1269.25,-486 1924.5,-486 1924.5,-486 1924.5,-486 1924.5,-217.6 1924.5,-217.6"/>
<polygon fill="black" stroke="black" points="1928,-217.6 1924.5,-207.6 1921,-217.6 1928,-217.6"/>
<text text-anchor="middle" x="204" y="-342.3" font-family="Arial" font-size="9.00">loads/updates</text>
</g>
<!-- IOException -->
<g id="node16" class="node">
<title>IOException</title>
<polygon fill="lightyellow" stroke="black" points="305.5,-326.5 305.5,-362.5 376.5,-362.5 376.5,-326.5 305.5,-326.5"/>
<text text-anchor="middle" x="341" y="-342" font-family="Arial" font-size="10.00">IOException</text>
</g>
<!-- DataRepository&#45;&gt;IOException -->
<g id="edge27" class="edge">
<title>DataRepository&#45;&gt;IOException</title>
<path fill="none" stroke="red" stroke-dasharray="5,2" d="M629.82,-543C500.35,-543 341,-543 341,-543 341,-543 341,-372.82 341,-372.82"/>
<polygon fill="red" stroke="red" points="341,-362.82 345.5,-372.82 341,-367.82 341,-372.82 341,-372.82 341,-372.82 341,-367.82 336.5,-372.82 341,-362.82 341,-362.82"/>
<text text-anchor="middle" x="365.5" y="-402.8" font-family="Arial" font-size="9.00">&lt;&lt;throws&gt;&gt;</text>
</g>
<!-- NullPointerException -->
<g id="node17" class="node">
<title>NullPointerException</title>
<polygon fill="lightyellow" stroke="black" points="449,-326.5 449,-362.5 557,-362.5 557,-326.5 449,-326.5"/>
<text text-anchor="middle" x="503" y="-342" font-family="Arial" font-size="10.00">NullPointerException</text>
</g>
<!-- DataRepository&#45;&gt;NullPointerException -->
<g id="edge28" class="edge">
<title>DataRepository&#45;&gt;NullPointerException</title>
<path fill="none" stroke="red" stroke-dasharray="5,2" d="M629.78,-494C563.83,-494 503,-494 503,-494 503,-494 503,-372.53 503,-372.53"/>
<polygon fill="red" stroke="red" points="503,-362.53 507.5,-372.53 503,-367.53 503,-372.53 503,-372.53 503,-372.53 503,-367.53 498.5,-372.53 503,-362.53 503,-362.53"/>
<text text-anchor="middle" x="527.5" y="-402.8" font-family="Arial" font-size="9.00">&lt;&lt;throws&gt;&gt;</text>
</g>
<!-- HotelReservation&#45;&gt;Reservation -->
<g id="edge22" class="edge">
<title>HotelReservation&#45;&gt;Reservation</title>
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M740,-325.43C740,-283.91 740,-189 740,-189 740,-189 1179.83,-189 1179.83,-189"/>
<polygon fill="none" stroke="black" points="1179.83,-192.5 1189.83,-189 1179.83,-185.5 1179.83,-192.5"/>
<text text-anchor="middle" x="850.5" y="-281.8" font-family="Arial" font-size="9.00">extends</text>
</g>
<!-- HouseReservation&#45;&gt;Reservation -->
<g id="edge23" class="edge">
<title>HouseReservation&#45;&gt;Reservation</title>
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M1149.23,-344C1180.36,-344 1205.75,-344 1205.75,-344 1205.75,-344 1205.75,-251.81 1205.75,-251.81"/>
<polygon fill="none" stroke="black" points="1209.25,-251.81 1205.75,-241.81 1202.25,-251.81 1209.25,-251.81"/>
<text text-anchor="middle" x="1146.5" y="-281.8" font-family="Arial" font-size="9.00">extends</text>
</g>
<!-- CabinReservation&#45;&gt;Reservation -->
<g id="edge24" class="edge">
<title>CabinReservation&#45;&gt;Reservation</title>
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M1333,-325.49C1333,-325.49 1333,-251.64 1333,-251.64"/>
<polygon fill="none" stroke="black" points="1336.5,-251.64 1333,-241.64 1329.5,-251.64 1336.5,-251.64"/>
<text text-anchor="middle" x="1349.5" y="-281.8" font-family="Arial" font-size="9.00">extends</text>
</g>
<!-- IReservation -->
<g id="node6" class="node">
<title>IReservation</title>
<polygon fill="lightyellow" stroke="black" points="1882,-17.5 1882,-53.5 1954,-53.5 1954,-17.5 1882,-17.5"/>
<text text-anchor="middle" x="1918" y="-33" font-family="Arial" font-size="10.00">IReservation</text>
</g>
<!-- Reservation&#45;&gt;IReservation -->
<g id="edge18" class="edge">
<title>Reservation&#45;&gt;IReservation</title>
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M1476.29,-154C1643.24,-154 1896.5,-154 1896.5,-154 1896.5,-154 1896.5,-63.76 1896.5,-63.76"/>
<polygon fill="none" stroke="black" points="1900,-63.76 1896.5,-53.76 1893,-63.76 1900,-63.76"/>
<text text-anchor="middle" x="1830" y="-93.8" font-family="Arial" font-size="9.00">implements</text>
</g>
<!-- Address -->
<g id="node9" class="node">
<title>Address</title>
<polygon fill="lightyellow" stroke="black" points="1524,-16.5 1524,-54.5 1810,-54.5 1810,-16.5 1524,-16.5"/>
<text text-anchor="middle" x="1667" y="-42.5" font-family="Arial" font-size="10.00">Address</text>
<polyline fill="none" stroke="black" points="1524,-35.5 1810,-35.5 "/>
<text text-anchor="start" x="1532" y="-23.5" font-family="Arial" font-size="10.00">+ Address(street: String, city: String, state: String, zip: String)</text>
</g>
<!-- Reservation&#45;&gt;Address -->
<g id="edge19" class="edge">
<title>Reservation&#45;&gt;Address</title>
<path fill="none" stroke="black" d="M1464,-137.19C1464,-92.37 1464,-35 1464,-35 1464,-35 1513.81,-35 1513.81,-35"/>
<polygon fill="black" stroke="black" points="1513.81,-38.5 1523.81,-35 1513.81,-31.5 1513.81,-38.5"/>
<text text-anchor="middle" x="1512" y="-93.8" font-family="Arial" font-size="9.00">has physical/mailing</text>
</g>
<!-- ReservationStatusEnum -->
<g id="node11" class="node">
<title>ReservationStatusEnum</title>
<polygon fill="lightyellow" stroke="black" points="1160.5,-17.5 1160.5,-53.5 1283.5,-53.5 1283.5,-17.5 1160.5,-17.5"/>
<text text-anchor="middle" x="1222" y="-33" font-family="Arial" font-size="10.00">ReservationStatusEnum</text>
</g>
<!-- Reservation&#45;&gt;ReservationStatusEnum -->
<g id="edge20" class="edge">
<title>Reservation&#45;&gt;ReservationStatusEnum</title>
<path fill="none" stroke="black" d="M1236.75,-137.36C1236.75,-137.36 1236.75,-63.68 1236.75,-63.68"/>
<polygon fill="black" stroke="black" points="1240.25,-63.68 1236.75,-53.68 1233.25,-63.68 1240.25,-63.68"/>
</g>
<!-- KitchenTypeEnum -->
<g id="node12" class="node">
<title>KitchenTypeEnum</title>
<polygon fill="lightyellow" stroke="black" points="1356,-17.5 1356,-53.5 1452,-53.5 1452,-17.5 1356,-17.5"/>
<text text-anchor="middle" x="1404" y="-33" font-family="Arial" font-size="10.00">KitchenTypeEnum</text>
</g>
<!-- Reservation&#45;&gt;KitchenTypeEnum -->
<g id="edge21" class="edge">
<title>Reservation&#45;&gt;KitchenTypeEnum</title>
<path fill="none" stroke="black" d="M1404,-137.36C1404,-137.36 1404,-63.68 1404,-63.68"/>
<polygon fill="black" stroke="black" points="1407.5,-63.68 1404,-53.68 1400.5,-63.68 1407.5,-63.68"/>
</g>
<!-- Account&#45;&gt;IReservation -->
<g id="edge15" class="edge">
<title>Account&#45;&gt;IReservation</title>
<path fill="none" stroke="black" d="M1932.5,-171.23C1932.5,-171.23 1932.5,-63.75 1932.5,-63.75"/>
<polygon fill="black" stroke="black" points="1936,-63.75 1932.5,-53.75 1929,-63.75 1936,-63.75"/>
<text text-anchor="middle" x="1956.5" y="-93.8" font-family="Arial" font-size="9.00">contains 0..*</text>
</g>
<!-- Account&#45;&gt;Address -->
<g id="edge16" class="edge">
<title>Account&#45;&gt;Address</title>
<path fill="none" stroke="black" d="M1910.77,-189C1842.05,-189 1667,-189 1667,-189 1667,-189 1667,-64.63 1667,-64.63"/>
<polygon fill="black" stroke="black" points="1670.5,-64.63 1667,-54.63 1663.5,-64.63 1670.5,-64.63"/>
<text text-anchor="middle" x="1705" y="-93.8" font-family="Arial" font-size="9.00">has mailing</text>
</g>
<!-- EmailAddress -->
<g id="node10" class="node">
<title>EmailAddress</title>
<polygon fill="lightyellow" stroke="black" points="2026.5,-16.5 2026.5,-54.5 2173.5,-54.5 2173.5,-16.5 2026.5,-16.5"/>
<text text-anchor="middle" x="2100" y="-42.5" font-family="Arial" font-size="10.00">EmailAddress</text>
<polyline fill="none" stroke="black" points="2026.5,-35.5 2173.5,-35.5 "/>
<text text-anchor="start" x="2034.5" y="-23.5" font-family="Arial" font-size="10.00">+ EmailAddress(email: String)</text>
</g>
<!-- Account&#45;&gt;EmailAddress -->
<g id="edge17" class="edge">
<title>Account&#45;&gt;EmailAddress</title>
<path fill="none" stroke="black" d="M1959.5,-171.47C1959.5,-130.72 1959.5,-35 1959.5,-35 1959.5,-35 2016.46,-35 2016.46,-35"/>
<polygon fill="black" stroke="black" points="2016.46,-38.5 2026.46,-35 2016.46,-31.5 2016.46,-38.5"/>
<text text-anchor="middle" x="2094" y="-93.8" font-family="Arial" font-size="9.00">has</text>
</g>
<!-- TestReservations -->
<g id="node14" class="node">
<title>TestReservations</title>
<polygon fill="lightyellow" stroke="black" points="1866.5,-884.5 1866.5,-922.5 1975.5,-922.5 1975.5,-884.5 1866.5,-884.5"/>
<text text-anchor="middle" x="1921" y="-910.5" font-family="Arial" font-size="10.00">TestReservations</text>
<polyline fill="none" stroke="black" points="1866.5,-903.5 1975.5,-903.5 "/>
<text text-anchor="start" x="1874.5" y="-891.5" font-family="Arial" font-size="10.00">+ main(args: String[])</text>
</g>
<!-- TestReservations&#45;&gt;AccomodationManager -->
<g id="edge10" class="edge">
<title>TestReservations&#45;&gt;AccomodationManager</title>
<path fill="none" stroke="black" d="M1870.38,-884.26C1870.38,-848.42 1870.38,-775 1870.38,-775 1870.38,-775 1454.09,-775 1454.09,-775"/>
<polygon fill="black" stroke="black" points="1454.09,-771.5 1444.09,-775 1454.09,-778.5 1454.09,-771.5"/>
<text text-anchor="middle" x="1524" y="-840.8" font-family="Arial" font-size="9.00">uses</text>
</g>
<!-- TestReservations&#45;&gt;HotelReservation -->
<g id="edge12" class="edge">
<title>TestReservations&#45;&gt;HotelReservation</title>
<path fill="none" stroke="black" d="M1874.25,-884.26C1874.25,-792.65 1874.25,-405 1874.25,-405 1874.25,-405 777,-405 777,-405 777,-405 777,-373.64 777,-373.64"/>
<polygon fill="black" stroke="black" points="780.5,-373.64 777,-363.64 773.5,-373.64 780.5,-373.64"/>
<text text-anchor="middle" x="1790.5" y="-630.8" font-family="Arial" font-size="9.00">creates</text>
</g>
<!-- TestReservations&#45;&gt;HouseReservation -->
<g id="edge13" class="edge">
<title>TestReservations&#45;&gt;HouseReservation</title>
<path fill="none" stroke="black" d="M1866.34,-903C1675.82,-903 1052.5,-903 1052.5,-903 1052.5,-903 1052.5,-373.72 1052.5,-373.72"/>
<polygon fill="black" stroke="black" points="1056,-373.72 1052.5,-363.72 1049,-373.72 1056,-373.72"/>
<text text-anchor="middle" x="1936.5" y="-630.8" font-family="Arial" font-size="9.00">creates</text>
</g>
<!-- TestReservations&#45;&gt;CabinReservation -->
<g id="edge14" class="edge">
<title>TestReservations&#45;&gt;CabinReservation</title>
<path fill="none" stroke="black" d="M1878.12,-884.24C1878.12,-785.86 1878.12,-344 1878.12,-344 1878.12,-344 1454.63,-344 1454.63,-344"/>
<polygon fill="black" stroke="black" points="1454.63,-340.5 1444.63,-344 1454.63,-347.5 1454.63,-340.5"/>
<text text-anchor="middle" x="2082.5" y="-630.8" font-family="Arial" font-size="9.00">creates</text>
</g>
<!-- TestReservations&#45;&gt;Account -->
<g id="edge11" class="edge">
<title>TestReservations&#45;&gt;Account</title>
<path fill="none" stroke="black" d="M1951.5,-884.4C1951.5,-884.4 1951.5,-217.67 1951.5,-217.67"/>
<polygon fill="black" stroke="black" points="1955,-217.67 1951.5,-207.67 1948,-217.67 1955,-217.67"/>
<text text-anchor="middle" x="2550" y="-516.8" font-family="Arial" font-size="9.00">uses</text>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 24 KiB

83
uml/classdiagram7.dot Normal file
View File

@@ -0,0 +1,83 @@
digraph "Reservation System - Account Load" {
// General graph settings
graph [
rankdir="TB",
splines=ortho,
nodesep=1.0,
ranksep=1.0,
fontname="Arial",
fontsize=12,
label="Reservation System - Account Loading"
];
// General node and edge settings
node [
shape=record,
style=filled,
fillcolor=lightyellow,
fontname="Arial",
fontsize=10
];
edge [
fontname="Arial",
fontsize=9
];
// Packages
subgraph cluster_reservationsystem {
label="lodge.reservationsystem";
style=filled;
color=lightgrey;
AccomodationManager [label="{AccomodationManager|+ AccomodationManager(home: String)\l+ newAccount(phone: String, addr: Address, email: EmailAddress): Account\l+ AddAccount(acct: Account)\l+ UpdateAccount(acct: Account)\l+ showAccountList()\l}"];
DataRepository [label="{DataRepository (Singleton)|- directoryPath: String\l- instance: DataRepository\l|+ getInstance(): DataRepository\l+ setDataStoreRoot(path: String)\l+ getPath(): String\l+ LoadAccount(file: Path): Account\l}"];
}
subgraph cluster_datamodel {
label="lodge.datamodel";
style=filled;
color=lightblue;
Account [label="{Account|+ Account()\l+ Account(phone: String, mailAddr: Address, email: EmailAddress)\l+ Write(acct: Account)\l+ checkValid()\l}"];
AccountList [label="{AccountList|+ add(acct: Account)\l+ save(acct: Account)\l+ find(account_number: String): Account\l+ showAccountList()\l}"];
Address [label="{Address|+ Address(street: String, city: String, state: String, zip: String)\l}"];
EmailAddress [label="{EmailAddress|+ EmailAddress(email: String)\l}"];
DuplicateObjectException [label="<<exception>>\nDuplicateObjectException"];
IllegalArgumentException [label="<<exception>>\nIllegalArgumentException"];
}
subgraph cluster_test {
label="lodge (Test)";
style=filled;
color=honeydew;
TestAccountLoad [label="{TestAccountLoad|+ main(args: String[])\l- Test_AddAccount(mgr: AccomodationManager, acct: Account)\l}"];
TestAccountLoad_getRepositoryConfig [label="{getRepositoryConfig|+ getPath(): String\l}"];
}
// Class Relationships
TestAccountLoad -> AccomodationManager [label="uses"];
TestAccountLoad -> Account [label="uses"];
TestAccountLoad -> Address [label="creates"];
TestAccountLoad -> EmailAddress [label="creates"];
TestAccountLoad -> TestAccountLoad_getRepositoryConfig [style=dashed, arrowhead=open, label="has inner"];
AccomodationManager -> AccountList [arrowhead=diamond,label="manages 1"];
AccomodationManager -> DataRepository [label="uses"];
AccomodationManager -> Account [label="creates/updates"];
AccountList -> Account [arrowhead=odiamond, label="0..*"];
Account -> Address [label="has mailing"];
Account -> EmailAddress [label="has"];
Account -> DataRepository [label="uses for persistence"];
DataRepository -> Account [label="loads"];
// Exception Relationships
edge [color=red, style=dashed, arrowhead=open];
AccomodationManager -> Exception [label="<<throws>>"];
AccountList -> DuplicateObjectException [label="<<throws>>"];
Account -> IllegalArgumentException [label="<<throws>>"];
Account -> IOException [label="<<throws>>"];
DataRepository -> IOException [label="<<throws>>"];
}

260
uml/classdiagram7.svg Normal file
View File

@@ -0,0 +1,260 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.42.4 (0)
-->
<!-- Title: Reservation System &#45; Account Load Pages: 1 -->
<svg width="1610pt" height="757pt"
viewBox="0.00 0.00 1610.00 757.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 753)">
<title>Reservation System &#45; Account Load</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-753 1606,-753 1606,4 -4,4"/>
<text text-anchor="middle" x="801" y="-7.4" font-family="Arial" font-size="12.00">Reservation System &#45; Account Loading</text>
<g id="clust1" class="cluster">
<title>cluster_reservationsystem</title>
<polygon fill="lightgrey" stroke="lightgrey" points="326,-304 326,-608 688,-608 688,-304 326,-304"/>
<text text-anchor="middle" x="507" y="-594.4" font-family="Arial" font-size="12.00">lodge.reservationsystem</text>
</g>
<g id="clust2" class="cluster">
<title>cluster_datamodel</title>
<polygon fill="lightblue" stroke="lightblue" points="696,-29 696,-428 1418,-428 1418,-29 696,-29"/>
<text text-anchor="middle" x="1057" y="-414.4" font-family="Arial" font-size="12.00">lodge.datamodel</text>
</g>
<g id="clust3" class="cluster">
<title>cluster_test</title>
<polygon fill="honeydew" stroke="honeydew" points="8,-510 8,-741 318,-741 318,-510 8,-510"/>
<text text-anchor="middle" x="163" y="-727.4" font-family="Arial" font-size="12.00">lodge (Test)</text>
</g>
<!-- AccomodationManager -->
<g id="node1" class="node">
<title>AccomodationManager</title>
<polygon fill="lightyellow" stroke="black" points="333.5,-496.5 333.5,-578.5 680.5,-578.5 680.5,-496.5 333.5,-496.5"/>
<text text-anchor="middle" x="507" y="-566.5" font-family="Arial" font-size="10.00">AccomodationManager</text>
<polyline fill="none" stroke="black" points="333.5,-559.5 680.5,-559.5 "/>
<text text-anchor="start" x="341.5" y="-547.5" font-family="Arial" font-size="10.00">+ AccomodationManager(home: String)</text>
<text text-anchor="start" x="341.5" y="-536.5" font-family="Arial" font-size="10.00">+ newAccount(phone: String, addr: Address, email: EmailAddress): Account</text>
<text text-anchor="start" x="341.5" y="-525.5" font-family="Arial" font-size="10.00">+ AddAccount(acct: Account)</text>
<text text-anchor="start" x="341.5" y="-514.5" font-family="Arial" font-size="10.00">+ UpdateAccount(acct: Account)</text>
<text text-anchor="start" x="341.5" y="-503.5" font-family="Arial" font-size="10.00">+ showAccountList()</text>
</g>
<!-- DataRepository -->
<g id="node2" class="node">
<title>DataRepository</title>
<polygon fill="lightyellow" stroke="black" points="442.5,-312.5 442.5,-413.5 611.5,-413.5 611.5,-312.5 442.5,-312.5"/>
<text text-anchor="middle" x="527" y="-401.5" font-family="Arial" font-size="10.00">DataRepository (Singleton)</text>
<polyline fill="none" stroke="black" points="442.5,-394.5 611.5,-394.5 "/>
<text text-anchor="start" x="450.5" y="-382.5" font-family="Arial" font-size="10.00">&#45; directoryPath: String</text>
<text text-anchor="start" x="450.5" y="-371.5" font-family="Arial" font-size="10.00">&#45; instance: DataRepository</text>
<polyline fill="none" stroke="black" points="442.5,-364.5 611.5,-364.5 "/>
<text text-anchor="start" x="450.5" y="-352.5" font-family="Arial" font-size="10.00">+ getInstance(): DataRepository</text>
<text text-anchor="start" x="450.5" y="-341.5" font-family="Arial" font-size="10.00">+ setDataStoreRoot(path: String)</text>
<text text-anchor="start" x="450.5" y="-330.5" font-family="Arial" font-size="10.00">+ getPath(): String</text>
<text text-anchor="start" x="450.5" y="-319.5" font-family="Arial" font-size="10.00">+ LoadAccount(file: Path): Account</text>
</g>
<!-- AccomodationManager&#45;&gt;DataRepository -->
<g id="edge7" class="edge">
<title>AccomodationManager&#45;&gt;DataRepository</title>
<path fill="none" stroke="black" d="M527,-496.15C527,-496.15 527,-423.72 527,-423.72"/>
<polygon fill="black" stroke="black" points="530.5,-423.72 527,-413.72 523.5,-423.72 530.5,-423.72"/>
<text text-anchor="middle" x="527" y="-452.8" font-family="Arial" font-size="9.00">uses</text>
</g>
<!-- Account -->
<g id="node3" class="node">
<title>Account</title>
<polygon fill="lightyellow" stroke="black" points="704,-158.5 704,-229.5 1010,-229.5 1010,-158.5 704,-158.5"/>
<text text-anchor="middle" x="857" y="-217.5" font-family="Arial" font-size="10.00">Account</text>
<polyline fill="none" stroke="black" points="704,-210.5 1010,-210.5 "/>
<text text-anchor="start" x="712" y="-198.5" font-family="Arial" font-size="10.00">+ Account()</text>
<text text-anchor="start" x="712" y="-187.5" font-family="Arial" font-size="10.00">+ Account(phone: String, mailAddr: Address, email: EmailAddress)</text>
<text text-anchor="start" x="712" y="-176.5" font-family="Arial" font-size="10.00">+ Write(acct: Account)</text>
<text text-anchor="start" x="712" y="-165.5" font-family="Arial" font-size="10.00">+ checkValid()</text>
</g>
<!-- AccomodationManager&#45;&gt;Account -->
<g id="edge8" class="edge">
<title>AccomodationManager&#45;&gt;Account</title>
<path fill="none" stroke="black" d="M634.5,-496.39C634.5,-410.09 634.5,-218 634.5,-218 634.5,-218 693.99,-218 693.99,-218"/>
<polygon fill="black" stroke="black" points="693.99,-221.5 703.99,-218 693.99,-214.5 693.99,-221.5"/>
<text text-anchor="middle" x="1073" y="-360.8" font-family="Arial" font-size="9.00">creates/updates</text>
</g>
<!-- AccountList -->
<g id="node4" class="node">
<title>AccountList</title>
<polygon fill="lightyellow" stroke="black" points="704,-327.5 704,-398.5 896,-398.5 896,-327.5 704,-327.5"/>
<text text-anchor="middle" x="800" y="-386.5" font-family="Arial" font-size="10.00">AccountList</text>
<polyline fill="none" stroke="black" points="704,-379.5 896,-379.5 "/>
<text text-anchor="start" x="712" y="-367.5" font-family="Arial" font-size="10.00">+ add(acct: Account)</text>
<text text-anchor="start" x="712" y="-356.5" font-family="Arial" font-size="10.00">+ save(acct: Account)</text>
<text text-anchor="start" x="712" y="-345.5" font-family="Arial" font-size="10.00">+ find(account_number: String): Account</text>
<text text-anchor="start" x="712" y="-334.5" font-family="Arial" font-size="10.00">+ showAccountList()</text>
</g>
<!-- AccomodationManager&#45;&gt;AccountList -->
<g id="edge6" class="edge">
<title>AccomodationManager&#45;&gt;AccountList</title>
<path fill="none" stroke="black" d="M657.5,-496.15C657.5,-444.54 657.5,-363 657.5,-363 657.5,-363 691.77,-363 691.77,-363"/>
<polygon fill="black" stroke="black" points="691.77,-363 697.77,-359 703.77,-363 697.77,-367 691.77,-363"/>
<text text-anchor="middle" x="745" y="-452.8" font-family="Arial" font-size="9.00">manages 1</text>
</g>
<!-- Exception -->
<g id="node11" class="node">
<title>Exception</title>
<polygon fill="lightyellow" stroke="black" points="258,-345 258,-381 318,-381 318,-345 258,-345"/>
<text text-anchor="middle" x="288" y="-360.5" font-family="Arial" font-size="10.00">Exception</text>
</g>
<!-- AccomodationManager&#45;&gt;Exception -->
<g id="edge14" class="edge">
<title>AccomodationManager&#45;&gt;Exception</title>
<path fill="none" stroke="red" stroke-dasharray="5,2" d="M333.34,-507C321.27,-507 313.75,-507 313.75,-507 313.75,-507 313.75,-391.24 313.75,-391.24"/>
<polygon fill="red" stroke="red" points="313.75,-381.24 318.25,-391.24 313.75,-386.24 313.75,-391.24 313.75,-391.24 313.75,-391.24 313.75,-386.24 309.25,-391.24 313.75,-381.24 313.75,-381.24"/>
<text text-anchor="middle" x="312.5" y="-452.8" font-family="Arial" font-size="9.00">&lt;&lt;throws&gt;&gt;</text>
</g>
<!-- DataRepository&#45;&gt;Account -->
<g id="edge13" class="edge">
<title>DataRepository&#45;&gt;Account</title>
<path fill="none" stroke="black" d="M599.5,-312.46C599.5,-266.56 599.5,-206 599.5,-206 599.5,-206 693.86,-206 693.86,-206"/>
<polygon fill="black" stroke="black" points="693.86,-209.5 703.86,-206 693.86,-202.5 693.86,-209.5"/>
<text text-anchor="middle" x="609.5" y="-268.8" font-family="Arial" font-size="9.00">loads</text>
</g>
<!-- IOException -->
<g id="node12" class="node">
<title>IOException</title>
<polygon fill="lightyellow" stroke="black" points="504.5,-38.5 504.5,-74.5 575.5,-74.5 575.5,-38.5 504.5,-38.5"/>
<text text-anchor="middle" x="540" y="-54" font-family="Arial" font-size="10.00">IOException</text>
</g>
<!-- DataRepository&#45;&gt;IOException -->
<g id="edge18" class="edge">
<title>DataRepository&#45;&gt;IOException</title>
<path fill="none" stroke="red" stroke-dasharray="5,2" d="M528.17,-312.39C528.17,-312.39 528.17,-84.62 528.17,-84.62"/>
<polygon fill="red" stroke="red" points="528.17,-74.62 532.67,-84.62 528.17,-79.62 528.17,-84.62 528.17,-84.62 528.17,-84.62 528.17,-79.62 523.67,-84.62 528.17,-74.62 528.17,-74.62"/>
<text text-anchor="middle" x="508.5" y="-191.8" font-family="Arial" font-size="9.00">&lt;&lt;throws&gt;&gt;</text>
</g>
<!-- Account&#45;&gt;DataRepository -->
<g id="edge12" class="edge">
<title>Account&#45;&gt;DataRepository</title>
<path fill="none" stroke="black" d="M703.75,-194C643.07,-194 587.5,-194 587.5,-194 587.5,-194 587.5,-302.29 587.5,-302.29"/>
<polygon fill="black" stroke="black" points="584,-302.29 587.5,-312.29 591,-302.29 584,-302.29"/>
<text text-anchor="middle" x="739" y="-268.8" font-family="Arial" font-size="9.00">uses for persistence</text>
</g>
<!-- Address -->
<g id="node5" class="node">
<title>Address</title>
<polygon fill="lightyellow" stroke="black" points="904,-37.5 904,-75.5 1190,-75.5 1190,-37.5 904,-37.5"/>
<text text-anchor="middle" x="1047" y="-63.5" font-family="Arial" font-size="10.00">Address</text>
<polyline fill="none" stroke="black" points="904,-56.5 1190,-56.5 "/>
<text text-anchor="start" x="912" y="-44.5" font-family="Arial" font-size="10.00">+ Address(street: String, city: String, state: String, zip: String)</text>
</g>
<!-- Account&#45;&gt;Address -->
<g id="edge10" class="edge">
<title>Account&#45;&gt;Address</title>
<path fill="none" stroke="black" d="M957,-158.23C957,-158.23 957,-85.58 957,-85.58"/>
<polygon fill="black" stroke="black" points="960.5,-85.58 957,-75.58 953.5,-85.58 960.5,-85.58"/>
<text text-anchor="middle" x="1019" y="-114.8" font-family="Arial" font-size="9.00">has mailing</text>
</g>
<!-- EmailAddress -->
<g id="node6" class="node">
<title>EmailAddress</title>
<polygon fill="lightyellow" stroke="black" points="1262.5,-37.5 1262.5,-75.5 1409.5,-75.5 1409.5,-37.5 1262.5,-37.5"/>
<text text-anchor="middle" x="1336" y="-63.5" font-family="Arial" font-size="10.00">EmailAddress</text>
<polyline fill="none" stroke="black" points="1262.5,-56.5 1409.5,-56.5 "/>
<text text-anchor="start" x="1270.5" y="-44.5" font-family="Arial" font-size="10.00">+ EmailAddress(email: String)</text>
</g>
<!-- Account&#45;&gt;EmailAddress -->
<g id="edge11" class="edge">
<title>Account&#45;&gt;EmailAddress</title>
<path fill="none" stroke="black" d="M1010.24,-166C1142.19,-166 1311.5,-166 1311.5,-166 1311.5,-166 1311.5,-85.57 1311.5,-85.57"/>
<polygon fill="black" stroke="black" points="1315,-85.57 1311.5,-75.57 1308,-85.57 1315,-85.57"/>
<text text-anchor="middle" x="1262" y="-114.8" font-family="Arial" font-size="9.00">has</text>
</g>
<!-- IllegalArgumentException -->
<g id="node8" class="node">
<title>IllegalArgumentException</title>
<polygon fill="lightyellow" stroke="black" points="704,-38.5 704,-74.5 832,-74.5 832,-38.5 704,-38.5"/>
<text text-anchor="middle" x="768" y="-54" font-family="Arial" font-size="10.00">IllegalArgumentException</text>
</g>
<!-- Account&#45;&gt;IllegalArgumentException -->
<g id="edge16" class="edge">
<title>Account&#45;&gt;IllegalArgumentException</title>
<path fill="none" stroke="red" stroke-dasharray="5,2" d="M768,-158.23C768,-158.23 768,-84.82 768,-84.82"/>
<polygon fill="red" stroke="red" points="768,-74.82 772.5,-84.82 768,-79.82 768,-84.82 768,-84.82 768,-84.82 768,-79.82 763.5,-84.82 768,-74.82 768,-74.82"/>
<text text-anchor="middle" x="841.5" y="-114.8" font-family="Arial" font-size="9.00">&lt;&lt;throws&gt;&gt;</text>
</g>
<!-- Account&#45;&gt;IOException -->
<g id="edge17" class="edge">
<title>Account&#45;&gt;IOException</title>
<path fill="none" stroke="red" stroke-dasharray="5,2" d="M703.97,-170C627.83,-170 551.83,-170 551.83,-170 551.83,-170 551.83,-84.74 551.83,-84.74"/>
<polygon fill="red" stroke="red" points="551.83,-74.74 556.33,-84.74 551.83,-79.74 551.83,-84.74 551.83,-84.74 551.83,-84.74 551.83,-79.74 547.33,-84.74 551.83,-74.74 551.83,-74.74"/>
<text text-anchor="middle" x="668.5" y="-114.8" font-family="Arial" font-size="9.00">&lt;&lt;throws&gt;&gt;</text>
</g>
<!-- AccountList&#45;&gt;Account -->
<g id="edge9" class="edge">
<title>AccountList&#45;&gt;Account</title>
<path fill="none" stroke="black" d="M800,-327.16C800,-327.16 800,-241.79 800,-241.79"/>
<polygon fill="none" stroke="black" points="800,-241.79 796,-235.79 800,-229.79 804,-235.79 800,-241.79"/>
<text text-anchor="middle" x="864" y="-268.8" font-family="Arial" font-size="9.00">0..*</text>
</g>
<!-- DuplicateObjectException -->
<g id="node7" class="node">
<title>DuplicateObjectException</title>
<polygon fill="lightyellow" stroke="black" points="1082,-176 1082,-212 1212,-212 1212,-176 1082,-176"/>
<text text-anchor="middle" x="1147" y="-191.5" font-family="Arial" font-size="10.00">DuplicateObjectException</text>
</g>
<!-- AccountList&#45;&gt;DuplicateObjectException -->
<g id="edge15" class="edge">
<title>AccountList&#45;&gt;DuplicateObjectException</title>
<path fill="none" stroke="red" stroke-dasharray="5,2" d="M896.2,-363C998.89,-363 1147,-363 1147,-363 1147,-363 1147,-222.09 1147,-222.09"/>
<polygon fill="red" stroke="red" points="1147,-212.09 1151.5,-222.09 1147,-217.09 1147,-222.09 1147,-222.09 1147,-222.09 1147,-217.09 1142.5,-222.09 1147,-212.09 1147,-212.09"/>
<text text-anchor="middle" x="973.5" y="-268.8" font-family="Arial" font-size="9.00">&lt;&lt;throws&gt;&gt;</text>
</g>
<!-- TestAccountLoad -->
<g id="node9" class="node">
<title>TestAccountLoad</title>
<polygon fill="lightyellow" stroke="black" points="16.5,-662.5 16.5,-711.5 309.5,-711.5 309.5,-662.5 16.5,-662.5"/>
<text text-anchor="middle" x="163" y="-699.5" font-family="Arial" font-size="10.00">TestAccountLoad</text>
<polyline fill="none" stroke="black" points="16.5,-692.5 309.5,-692.5 "/>
<text text-anchor="start" x="24.5" y="-680.5" font-family="Arial" font-size="10.00">+ main(args: String[])</text>
<text text-anchor="start" x="24.5" y="-669.5" font-family="Arial" font-size="10.00">&#45; Test_AddAccount(mgr: AccomodationManager, acct: Account)</text>
</g>
<!-- TestAccountLoad&#45;&gt;AccomodationManager -->
<g id="edge1" class="edge">
<title>TestAccountLoad&#45;&gt;AccomodationManager</title>
<path fill="none" stroke="black" d="M283.75,-662.34C283.75,-627.49 283.75,-568 283.75,-568 283.75,-568 323.3,-568 323.3,-568"/>
<polygon fill="black" stroke="black" points="323.3,-571.5 333.3,-568 323.3,-564.5 323.3,-571.5"/>
<text text-anchor="middle" x="403" y="-618.8" font-family="Arial" font-size="9.00">uses</text>
</g>
<!-- TestAccountLoad&#45;&gt;Account -->
<g id="edge2" class="edge">
<title>TestAccountLoad&#45;&gt;Account</title>
<path fill="none" stroke="black" d="M237,-662.3C237,-560.91 237,-182 237,-182 237,-182 693.74,-182 693.74,-182"/>
<polygon fill="black" stroke="black" points="693.74,-185.5 703.74,-182 693.74,-178.5 693.74,-185.5"/>
<text text-anchor="middle" x="1225" y="-452.8" font-family="Arial" font-size="9.00">uses</text>
</g>
<!-- TestAccountLoad&#45;&gt;Address -->
<g id="edge3" class="edge">
<title>TestAccountLoad&#45;&gt;Address</title>
<path fill="none" stroke="black" d="M309.8,-678C560.89,-678 1046,-678 1046,-678 1046,-678 1046,-85.78 1046,-85.78"/>
<polygon fill="black" stroke="black" points="1049.5,-85.78 1046,-75.78 1042.5,-85.78 1049.5,-85.78"/>
<text text-anchor="middle" x="1411.5" y="-360.8" font-family="Arial" font-size="9.00">creates</text>
</g>
<!-- TestAccountLoad&#45;&gt;EmailAddress -->
<g id="edge4" class="edge">
<title>TestAccountLoad&#45;&gt;EmailAddress</title>
<path fill="none" stroke="black" d="M309.54,-695C629.15,-695 1360.5,-695 1360.5,-695 1360.5,-695 1360.5,-85.61 1360.5,-85.61"/>
<polygon fill="black" stroke="black" points="1364,-85.61 1360.5,-75.61 1357,-85.61 1364,-85.61"/>
<text text-anchor="middle" x="1586.5" y="-360.8" font-family="Arial" font-size="9.00">creates</text>
</g>
<!-- TestAccountLoad_getRepositoryConfig -->
<g id="node10" class="node">
<title>TestAccountLoad_getRepositoryConfig</title>
<polygon fill="lightyellow" stroke="black" points="110,-518.5 110,-556.5 216,-556.5 216,-518.5 110,-518.5"/>
<text text-anchor="middle" x="163" y="-544.5" font-family="Arial" font-size="10.00">getRepositoryConfig</text>
<polyline fill="none" stroke="black" points="110,-537.5 216,-537.5 "/>
<text text-anchor="start" x="118" y="-525.5" font-family="Arial" font-size="10.00">+ getPath(): String</text>
</g>
<!-- TestAccountLoad&#45;&gt;TestAccountLoad_getRepositoryConfig -->
<g id="edge5" class="edge">
<title>TestAccountLoad&#45;&gt;TestAccountLoad_getRepositoryConfig</title>
<path fill="none" stroke="black" stroke-dasharray="5,2" d="M163,-662.31C163,-662.31 163,-566.52 163,-566.52"/>
<polygon fill="black" stroke="black" points="163,-556.52 167.5,-566.52 163,-561.52 163,-566.52 163,-566.52 163,-566.52 163,-561.52 158.5,-566.52 163,-556.52 163,-556.52"/>
<text text-anchor="middle" x="182.5" y="-618.8" font-family="Arial" font-size="9.00">has inner</text>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 17 KiB