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()"];
}
