diff --git a/2.Design Document/DD.lyx b/2.Design Document/DD.lyx index 6cbf300..e22add0 100644 --- a/2.Design Document/DD.lyx +++ b/2.Design Document/DD.lyx @@ -3934,7 +3934,7 @@ In this way we would achieve our goal to distribute cars in the smartest \end_layout \begin_layout Subsection -How to calculate the Reservation fees +How to apply the Reservation fees \end_layout \begin_layout Standard @@ -3943,7 +3943,7 @@ In this section we will analyze the structure of the code that will handle \end_layout \begin_layout Subparagraph* -calculateReservationFees(Reservation) +applyReservationFees(Reservation) \end_layout \begin_layout Standard @@ -3969,16 +3969,16 @@ begin{lstlisting} \begin_layout Plain Layout -/* This function will calculate the fees for each reservation entity. - Actually, the user can terminate a reservation for free, but in the future +/* This function will apply the fees for each Reservation entity. + Actually, the user can terminate a reservation for free, but in the future if PowerEnjoy would decide to apply a fee for the termination of a reservation, - it would be very easy to modify this function. - If the user pick up the car, his reservation terminates and the system - will create another object 'rent': no fees will be applied to transform - a reservation into a rent. - On the other hand, if the reservation expires before the user pick up the - car, the system will apply to him a fee of one euro. - As said before, it would not be difficult in the future also to change + it would be very easy to modify this value. + If the user picks up the car, his reservation terminates and the system + will create another object Rent: no fees will be applied to transform a + reservation into a rent. + On the other hand, if the reservation expires before the user picks up + the car, the system will apply to him a fee of one euro. + As said before, it would not be difficult in the future also to change this amount of money. \end_layout @@ -3993,7 +3993,7 @@ begin{lstlisting} \begin_layout Plain Layout -function calculateReservationFees (Reservation res){ +function applyReservationFees (Reservation res){ \end_layout \begin_layout Plain Layout @@ -4304,7 +4304,7 @@ end{lstlisting} \end_layout \begin_layout Subparagraph* -calculateAdditionalFee(Rent) +calculateAdditionalFees(Rent) \end_layout \begin_layout Standard @@ -4340,7 +4340,7 @@ begin{lstlisting} \begin_layout Plain Layout -void function calculateAdditionalFee(Rent ren){ +void function calculateAdditionalFees(Rent ren){ \end_layout \begin_layout Plain Layout @@ -4427,7 +4427,7 @@ begin{lstlisting} \begin_layout Plain Layout -/* This function will calculate the fees for each rent entity. +/* This function will calculate the fees for each Rent entity. In this case we have to consider eventual discounts and other additional fees before sending the payment request to the external payment service. It would not be difficult in the future to change some parameters according @@ -4481,7 +4481,7 @@ function calculateRentFees (Rent ren){ \begin_layout Plain Layout - calculateAdditionalFee(ren); + calculateAdditionalFees(ren); \end_layout \begin_layout Plain Layout diff --git a/3.Integration Test Plan Document/ITPD.lyx b/3.Integration Test Plan Document/ITPD.lyx index 2b8f186..4780130 100644 --- a/3.Integration Test Plan Document/ITPD.lyx +++ b/3.Integration Test Plan Document/ITPD.lyx @@ -1789,6 +1789,10 @@ In the Sequence Diagrams shown in the Section 2.5 of the Design Document Account Management \end_layout +\begin_layout Paragraph +Authentication Manager +\end_layout + \begin_layout Standard Main functions implemented by the \series bold @@ -1805,7 +1809,7 @@ Authentication Manager \align center \begin_inset Tabular - + @@ -1814,7 +1818,7 @@ Authentication Manager \begin_layout Plain Layout \family typewriter -register +register(Credentials) \end_layout \end_inset @@ -1826,12 +1830,12 @@ register \begin_layout Plain Layout \begin_inset Tabular - + - - + + - + \begin_inset Text \begin_layout Plain Layout @@ -1842,11 +1846,12 @@ Description \end_inset - + \begin_inset Text \begin_layout Plain Layout -This is a cool description +This function creates a new User object in the system with all the information + provided by the user. \end_layout \end_inset @@ -1859,7 +1864,7 @@ This is a cool description \begin_layout Plain Layout \shape slanted -Input +Input Specification \end_layout \end_inset @@ -1877,7 +1882,7 @@ Effect - + \begin_inset Text \begin_layout Plain Layout @@ -1886,13 +1891,33 @@ A null parameter \end_inset - + \begin_inset Text \begin_layout Plain Layout A NullArgumentException is raised. \end_layout +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +An incomplete / duplicate set of information about the new user +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +An InvalidArgumentException is raised. +\end_layout + \end_inset @@ -1901,7 +1926,8 @@ A NullArgumentException is raised. \begin_inset Text \begin_layout Plain Layout -A non-null user +A full set of information about the new user (username, password, name, + surname, ...) \end_layout \end_inset @@ -1910,7 +1936,8 @@ A non-null user \begin_inset Text \begin_layout Plain Layout -The user data are correctly inserted in the database. +The unique user data are correctly inserted in the database. + \end_layout \end_inset @@ -1944,7 +1971,7 @@ The user data are correctly inserted in the database. \align center \begin_inset Tabular - + @@ -1953,7 +1980,7 @@ The user data are correctly inserted in the database. \begin_layout Plain Layout \family typewriter -register +login(Credentials) \end_layout \end_inset @@ -1965,12 +1992,12 @@ register \begin_layout Plain Layout \begin_inset Tabular - + - - + + - + \begin_inset Text \begin_layout Plain Layout @@ -1981,11 +2008,12 @@ Description \end_inset - + \begin_inset Text \begin_layout Plain Layout -This is a cool description +This function allows any registered user to log into the system using his + username and password. \end_layout \end_inset @@ -1998,7 +2026,7 @@ This is a cool description \begin_layout Plain Layout \shape slanted -Input +Input Specification \end_layout \end_inset @@ -2016,7 +2044,7 @@ Effect - + \begin_inset Text \begin_layout Plain Layout @@ -2025,13 +2053,33 @@ A null parameter \end_inset - + \begin_inset Text \begin_layout Plain Layout A NullArgumentException is raised. \end_layout +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +An invalid object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +An InvalidArgumentException is raised. +\end_layout + \end_inset @@ -2040,7 +2088,7 @@ A NullArgumentException is raised. \begin_inset Text \begin_layout Plain Layout -A non-null user +An existent and valid Credentials object \end_layout \end_inset @@ -2049,7 +2097,1341 @@ A non-null user \begin_inset Text \begin_layout Plain Layout -The user data are correctly inserted in the database. +The user is logged in. +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + + + +\end_inset + + +\begin_inset VSpace smallskip +\end_inset + + +\end_layout + +\begin_layout Standard +\align center +\begin_inset Tabular + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\family typewriter +checkCredentials(Credentials) +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\series bold +Description +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +This function verifies the user - password combination is correct. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Input Specification +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Effect +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A null parameter +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +A NullArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +An invalid object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +An InvalidArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +An existent and valid Credentials object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +Returns true. +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\begin_layout Paragraph +AccountInformation Manager +\end_layout + +\begin_layout Standard +Main functions implemented by the +\series bold +AccountInformation Manager +\series default +: +\begin_inset VSpace smallskip +\end_inset + + +\end_layout + +\begin_layout Standard +\align center +\begin_inset Tabular + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\family typewriter +removeUser(User) +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\series bold +Description +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +This function deletes the User object from the system. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Input Specification +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Effect +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A null parameter +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +A NullArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +An invalid object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +An InvalidArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +An existent and valid User object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +The User object is correctly removed. +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset VSpace smallskip +\end_inset + + +\end_layout + +\begin_layout Standard +\align center +\begin_inset Tabular + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\family typewriter +activate(User) +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\series bold +Description +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +This function restores the privileges of the User object. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Input Specification +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Effect +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A null parameter +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +A NullArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +An invalid object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +An InvalidArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +An Active User object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +An InvalidArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A Deactivated User object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +The User object is no more a Deactivated User. +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\begin_layout Standard +\align center +\begin_inset VSpace smallskip +\end_inset + + +\end_layout + +\begin_layout Standard +\align center +\begin_inset Tabular + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\family typewriter +deactivate(User) +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\series bold +Description +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +This function removes privileges from the User object. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Input Specification +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Effect +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A null parameter +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +A NullArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +An invalid object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +An InvalidArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A Deactivated User object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +An InvalidArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +An Active User object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +The User object is no more an Active User. +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + + + +\end_inset + + +\begin_inset VSpace smallskip +\end_inset + + +\end_layout + +\begin_layout Standard +\align center +\begin_inset Tabular + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\family typewriter +editProfile(User, Credentials) +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\series bold +Description +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +This function updates the existent User object in the system with all the + new information provided by the Credentials object. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Input Specification +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Effect +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A null parameter +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +A NullArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +An incomplete set of information +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +An InvalidArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +An invalid object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +An InvalidArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A full set of information about the User object (username, password, name, + surname, ...) +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +The User data is correctly updated in the database. + +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + + + +\end_inset + + +\begin_inset VSpace smallskip +\end_inset + + +\end_layout + +\begin_layout Standard +\align center +\begin_inset Tabular + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\family typewriter +getHistory(User) +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\series bold +Description +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +This function returns all the User reservations. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Input Specification +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Effect +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A null parameter +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +A NullArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +An invalid object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +An InvalidArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +An existent and valid User object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +A list of all the reservations is returned. +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\begin_layout Standard +\align center +\begin_inset VSpace smallskip +\end_inset + + +\end_layout + +\begin_layout Standard +\align center +\begin_inset Tabular + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\family typewriter +enableMSO(User) +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\series bold +Description +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +This function enables the Money Saving Option for the User. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Input Specification +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Effect +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A null parameter +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +A NullArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +An invalid object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +An InvalidArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +An existent and valid User object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +The User object has the MSO enabled. +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + + + +\end_inset + + +\begin_inset VSpace smallskip +\end_inset + + +\end_layout + +\begin_layout Standard +\align center +\begin_inset Tabular + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\family typewriter +disableMSO(User) +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\series bold +Description +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +This function disables the Money Saving Option for the User. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Input Specification +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Effect +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A null parameter +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +A NullArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +An invalid object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +An InvalidArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +An existent and valid User object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +The User object has the MSO disabled. \end_layout \end_inset @@ -2076,10 +3458,14 @@ The user data are correctly inserted in the database. Car Management \end_layout +\begin_layout Paragraph +ADS_Application Manager +\end_layout + \begin_layout Standard Main functions implemented by the \series bold -Car Manager +ADS_Application Manager \series default : \begin_inset VSpace smallskip @@ -2092,7 +3478,7 @@ Car Manager \align center \begin_inset Tabular - + @@ -2101,7 +3487,7 @@ Car Manager \begin_layout Plain Layout \family typewriter -register +getStatus() \end_layout \end_inset @@ -2113,12 +3499,12 @@ register \begin_layout Plain Layout \begin_inset Tabular - + - - + + - + \begin_inset Text \begin_layout Plain Layout @@ -2129,11 +3515,27 @@ Description \end_inset - + \begin_inset Text \begin_layout Plain Layout -This is a cool description +This function asks the ADS to check the current status ( +\shape slanted +available +\shape default +, +\shape slanted +reserved +\shape default +, +\shape slanted +in_use +\shape default +, +\shape slanted +unavailable +\shape default +) of the car. \end_layout \end_inset @@ -2146,7 +3548,7 @@ This is a cool description \begin_layout Plain Layout \shape slanted -Input +Input Specification \end_layout \end_inset @@ -2168,27 +3570,7 @@ Effect \begin_inset Text \begin_layout Plain Layout -A null parameter -\end_layout - -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout -A NullArgumentException is raised. -\end_layout - -\end_inset - - - - -\begin_inset Text - -\begin_layout Plain Layout -A non-null user +None \end_layout \end_inset @@ -2197,7 +3579,7 @@ A non-null user \begin_inset Text \begin_layout Plain Layout -The user data are correctly inserted in the database. +The car status is returned. \end_layout \end_inset @@ -2231,7 +3613,7 @@ The user data are correctly inserted in the database. \align center \begin_inset Tabular - + @@ -2240,7 +3622,7 @@ The user data are correctly inserted in the database. \begin_layout Plain Layout \family typewriter -register +getDamages() \end_layout \end_inset @@ -2252,12 +3634,12 @@ register \begin_layout Plain Layout \begin_inset Tabular - + - - + + - + \begin_inset Text \begin_layout Plain Layout @@ -2268,11 +3650,18 @@ Description \end_inset - + \begin_inset Text \begin_layout Plain Layout -This is a cool description +This function queries the ADS to check the eventual car’s damages through + the sensors installed in there. + If the ADS find any kind of anomalies, it will change the status of the + car into +\shape slanted +unavailable +\shape default +. \end_layout \end_inset @@ -2285,7 +3674,7 @@ This is a cool description \begin_layout Plain Layout \shape slanted -Input +Input Specification \end_layout \end_inset @@ -2307,16 +3696,117 @@ Effect \begin_inset Text \begin_layout Plain Layout -A null parameter +None \end_layout \end_inset - + \begin_inset Text \begin_layout Plain Layout -A NullArgumentException is raised. +The car damages are returned and the car status is updated. + +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\begin_layout Standard +\align center +\begin_inset VSpace smallskip +\end_inset + + +\end_layout + +\begin_layout Standard +\align center +\begin_inset Tabular + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\family typewriter +getPosition() +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\series bold +Description +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +This function queries the ADS to check the current position of the car. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Input Specification +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Effect \end_layout \end_inset @@ -2327,7 +3817,7 @@ A NullArgumentException is raised. \begin_inset Text \begin_layout Plain Layout -A non-null user +None \end_layout \end_inset @@ -2336,7 +3826,3093 @@ A non-null user \begin_inset Text \begin_layout Plain Layout -The user data are correctly inserted in the database. +The current position of the car is returned. +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + + + +\end_inset + + +\begin_inset VSpace smallskip +\end_inset + + +\end_layout + +\begin_layout Standard +\align center +\begin_inset Tabular + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\family typewriter +getPassengers() +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\series bold +Description +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +This function queries the ADS the number of passengers actually inside the + car. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Input Specification +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Effect +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +None +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +The number of passengers actually inside the car is returned. + +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + + + +\end_inset + + +\begin_inset VSpace smallskip +\end_inset + + +\end_layout + +\begin_layout Standard +\align center +\begin_inset Tabular + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\family typewriter +checkPowerGrid() +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\series bold +Description +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +This function queries the ADS to check if the car is plugged into the power + grid. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Input Specification +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Effect +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +None +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +Returns true if the car is plugged into the power grid, false otherwise. +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\begin_layout Standard +\align center +\begin_inset VSpace smallskip +\end_inset + + +\end_layout + +\begin_layout Standard +\align center +\begin_inset Tabular + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\family typewriter +lockDoors() +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\series bold +Description +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +This function queries the ADS the lock the car’s doors and to change the + status of the car into +\shape slanted +available +\shape default +. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Input Specification +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Effect +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +None +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +The doors are locked. +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\begin_layout Standard +\align center +\begin_inset VSpace smallskip +\end_inset + + +\end_layout + +\begin_layout Standard +\align center +\begin_inset Tabular + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\family typewriter +unlockDoors() +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\series bold +Description +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +This function queries the ADS the unlock the car’s doors and to change the + status of the car into +\shape slanted +in_use +\shape default +. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Input Specification +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Effect +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +None +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +The doors are unlocked. +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + + + +\end_inset + + +\begin_inset VSpace smallskip +\end_inset + + +\end_layout + +\begin_layout Standard +\align center +\begin_inset Tabular + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\family typewriter +updateCarStatus(Status) +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\series bold +Description +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +This function queries the ADS the change the car’s status into the one passed + as argument. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Input Specification +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Effect +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A null parameter +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +A NullArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +An invalid object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +An InvalidArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A valid Status object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +The car status is updated according to the Status object. +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\begin_layout Paragraph +Car Manager +\end_layout + +\begin_layout Standard +Main functions implemented by the +\series bold +Car Manager +\series default +: +\end_layout + +\begin_layout Standard +\align center +\begin_inset VSpace smallskip +\end_inset + + +\end_layout + +\begin_layout Standard +\align center +\begin_inset Tabular + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\family typewriter +contactMaintainanceService(Car) +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\series bold +Description +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +Every time the Car Manager retrieve information about a car’s status, if + necessary, it will send a request of maintainance to an external maintanance + service through this function. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Input Specification +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Effect +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A null parameter +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +A NullArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +An invalid object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +An InvalidArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A valid Car object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +A maintainance request to an external service is successfully sent for the + specified Car. +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\begin_layout Standard +\align center +\begin_inset VSpace smallskip +\end_inset + + +\end_layout + +\begin_layout Standard +\align center +\begin_inset Tabular + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\family typewriter +ping(Car) +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\series bold +Description +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +This function queries a Car to check whether it is online. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Input Specification +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Effect +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A null parameter +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +A NullArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +An invalid object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +An InvalidArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A valid Car object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +A response from the Car is received. +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\begin_layout Standard +\align center +\begin_inset VSpace smallskip +\end_inset + + +\end_layout + +\begin_layout Standard +\align center +\begin_inset Tabular + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\family typewriter +carsInRadius(Location) +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\series bold +Description +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +This function retrieves all the cars near the Location passed as argument. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Input Specification +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Effect +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A null parameter +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +A NullArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +An invalid object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +An InvalidArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A valid Location object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +Returns a list of cars around the Location. +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\begin_layout Subsection +Reservation Management +\end_layout + +\begin_layout Paragraph +CheckAvailability Manager +\end_layout + +\begin_layout Standard +Main functions implemented by the +\series bold + CheckAvailability Manager +\series default +: +\end_layout + +\begin_layout Standard +\begin_inset VSpace smallskip +\end_inset + + +\end_layout + +\begin_layout Standard +\align center +\begin_inset Tabular + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\family typewriter +getUserPosition(User) +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\series bold +Description +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +This function will retrieve the information about the user’s position through + the Google Maps API. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Input Specification +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Effect +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A null parameter +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +A NullArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +An invalid object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +An InvalidArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A valid User object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +A Location object is returned representing the current position of the user. +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset VSpace smallskip +\end_inset + + +\end_layout + +\begin_layout Standard +\align center +\begin_inset Tabular + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\family typewriter +getAvailableCars(Location) +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\series bold +Description +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +This function return a list of available cars near the user's Location. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Input Specification +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Effect +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A null parameter +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +A NullArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +An invalid object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +An InvalidArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A valid Location object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +Returns a list of available cars near the Location. +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\begin_layout Paragraph +Reservation Manager +\end_layout + +\begin_layout Standard +Main functions implemented by the +\series bold + Reservation Manager +\series default +: +\begin_inset VSpace smallskip +\end_inset + + +\end_layout + +\begin_layout Standard +\align center +\begin_inset Tabular + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\family typewriter +getUserPosition(User) +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\series bold +Description +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +This function will retrieve the information about the user’s position through + the Google Maps API. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Input Specification +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Effect +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A null parameter +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +A NullArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +An invalid object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +An InvalidArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A valid User object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +A Location object is returned representing the current position of the user. +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset VSpace smallskip +\end_inset + + +\end_layout + +\begin_layout Standard +\align center +\begin_inset Tabular + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\family typewriter +getReservableCars(Location) +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\series bold +Description +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +This function return a list of reservable cars near the user's Location. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Input Specification +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Effect +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A null parameter +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +A NullArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +An invalid object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +An InvalidArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A valid Location object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +Returns a list of reservable cars near the Location. +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset VSpace smallskip +\end_inset + + +\end_layout + +\begin_layout Standard +\align center +\begin_inset Tabular + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\family typewriter +isTerminable(Reservation) +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\series bold +Description +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +This function will check if all the conditions to end the reservation are + respected. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Input Specification +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Effect +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A null parameter +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +A NullArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +An invalid object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +An InvalidArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A valid Reservation object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +Returns true if the reservation is terminable, false otherwise. +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset VSpace smallskip +\end_inset + + +\end_layout + +\begin_layout Standard +\align center +\begin_inset Tabular + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\family typewriter +isTerminable(Rent) +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\series bold +Description +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +This function will check if all the conditions to end the rent are respected + (for example if nobody is still in the car, and so on..).. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Input Specification +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Effect +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A null parameter +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +A NullArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +An invalid object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +An InvalidArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A valid Rent object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +Returns true if the rent is terminable, false otherwise. +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset VSpace smallskip +\end_inset + + +\end_layout + +\begin_layout Standard +\align center +\begin_inset Tabular + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\family typewriter +startReservation(Car, User) +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\series bold +Description +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +This function creates a new instance of Reservation, tying together the + Car and User object passed as argument. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Input Specification +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Effect +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A null parameter +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +A NullArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +An invalid object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +An InvalidArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +Valid User and Car objects +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +A new instance of Reservation is correctly created. +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset VSpace smallskip +\end_inset + + +\end_layout + +\begin_layout Standard +\align center +\begin_inset Tabular + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\family typewriter +endReservation(Reservation) +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\series bold +Description +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +This function terminates the current Reservation. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Input Specification +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Effect +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A null parameter +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +A NullArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +An invalid object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +An InvalidArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A valid Reservation object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +The state of the Reservation object is changed into +\shape italic +terminated +\shape default +, and the reservation is no more active. +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset VSpace smallskip +\end_inset + + +\end_layout + +\begin_layout Standard +\align center +\begin_inset Tabular + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\family typewriter +checkReservationStatus(Reservation) +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\series bold +Description +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +This function retrieves all the information about the Reservation object + passed as argument. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Input Specification +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Effect +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A null parameter +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +A NullArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +An invalid object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +An InvalidArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A valid Reservation object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +Returns the current status of the Reservation. +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset VSpace smallskip +\end_inset + + +\end_layout + +\begin_layout Standard +\align center +\begin_inset Tabular + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\family typewriter +startRent(Reservation) +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\series bold +Description +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +This function creates a new instance of Rent, updating the Reservation object + passed as argument. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Input Specification +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Effect +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A null parameter +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +A NullArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +An invalid object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +An InvalidArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A valid Reservation object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +A new instance of Rent is correctly created. +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset VSpace smallskip +\end_inset + + +\end_layout + +\begin_layout Standard +\align center +\begin_inset Tabular + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\family typewriter +endRent(Rent) +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\series bold +Description +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +This function terminates the current Rent. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Input Specification +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Effect +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A null parameter +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +A NullArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +An invalid object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +An InvalidArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A valid Rent object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +The state of the Rent object is changed into +\shape italic +terminated +\shape default +, and the rent is no more active. +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset VSpace smallskip +\end_inset + + +\end_layout + +\begin_layout Standard +\align center +\begin_inset Tabular + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\family typewriter +checkRentStatus(Rent) +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\series bold +Description +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +This function retrieves all the information about the Rent object passed + as argument. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Input Specification +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Effect +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A null parameter +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +A NullArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +An invalid object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +An InvalidArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A valid Rent object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +Returns the current status of the Rent. \end_layout \end_inset @@ -2363,10 +6939,14 @@ The user data are correctly inserted in the database. Events Handler \end_layout +\begin_layout Paragraph +Notification Manager +\end_layout + \begin_layout Standard Main functions implemented by the \series bold - Events Handler + Notification Manager \series default : \begin_inset VSpace smallskip @@ -2379,7 +6959,7 @@ Main functions implemented by the \align center \begin_inset Tabular - + @@ -2388,7 +6968,7 @@ Main functions implemented by the \begin_layout Plain Layout \family typewriter -register +notify(User, Notification) \end_layout \end_inset @@ -2400,12 +6980,12 @@ register \begin_layout Plain Layout \begin_inset Tabular - + - - + + - + \begin_inset Text \begin_layout Plain Layout @@ -2416,11 +6996,11 @@ Description \end_inset - + \begin_inset Text \begin_layout Plain Layout -This is a cool description +This function notifies a message to the user. \end_layout \end_inset @@ -2433,7 +7013,7 @@ This is a cool description \begin_layout Plain Layout \shape slanted -Input +Input Specification \end_layout \end_inset @@ -2451,7 +7031,7 @@ Effect - + \begin_inset Text \begin_layout Plain Layout @@ -2460,7 +7040,7 @@ A null parameter \end_inset - + \begin_inset Text \begin_layout Plain Layout @@ -2471,119 +7051,20 @@ A NullArgumentException is raised. - + \begin_inset Text \begin_layout Plain Layout -A non-null user +An invalid object \end_layout \end_inset - + \begin_inset Text \begin_layout Plain Layout -The user data are correctly inserted in the database. -\end_layout - -\end_inset - - - - -\end_inset - - -\end_layout - -\end_inset - - - - -\end_inset - - -\end_layout - -\begin_layout Standard -\begin_inset VSpace smallskip -\end_inset - - -\end_layout - -\begin_layout Standard -\align center -\begin_inset Tabular - - - - - -\begin_inset Text - -\begin_layout Plain Layout - -\family typewriter -register -\end_layout - -\end_inset - - - - -\begin_inset Text - -\begin_layout Plain Layout -\begin_inset Tabular - - - - - - -\begin_inset Text - -\begin_layout Plain Layout - -\series bold -Description -\end_layout - -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout -This is a cool description -\end_layout - -\end_inset - - - - -\begin_inset Text - -\begin_layout Plain Layout - -\shape slanted -Input -\end_layout - -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout - -\shape slanted -Effect +An InvalidArgumentException is raised. \end_layout \end_inset @@ -2594,27 +7075,7 @@ Effect \begin_inset Text \begin_layout Plain Layout -A null parameter -\end_layout - -\end_inset - - -\begin_inset Text - -\begin_layout Plain Layout -A NullArgumentException is raised. -\end_layout - -\end_inset - - - - -\begin_inset Text - -\begin_layout Plain Layout -A non-null user +Valid User and Notification objects \end_layout \end_inset @@ -2623,7 +7084,7 @@ A non-null user \begin_inset Text \begin_layout Plain Layout -The user data are correctly inserted in the database. +The Notification is correctly displayed to the User. \end_layout \end_inset @@ -2646,14 +7107,14 @@ The user data are correctly inserted in the database. \end_layout -\begin_layout Subsection -Interfaces +\begin_layout Paragraph +Payment Manager \end_layout \begin_layout Standard -Main functions implemented by the +Main functions implemented by the \series bold -Interfaces + Payment Manager \series default : \begin_inset VSpace smallskip @@ -2666,7 +7127,7 @@ Interfaces \align center \begin_inset Tabular - + @@ -2675,7 +7136,7 @@ Interfaces \begin_layout Plain Layout \family typewriter -register +applyReservationFees(Reservation) \end_layout \end_inset @@ -2687,12 +7148,12 @@ register \begin_layout Plain Layout \begin_inset Tabular - + - - + + - + \begin_inset Text \begin_layout Plain Layout @@ -2703,11 +7164,20 @@ Description \end_inset - + \begin_inset Text \begin_layout Plain Layout -This is a cool description +This function will apply the fees for each Reservation entity. + Actually, the user can terminate a reservation for free, but in the future + if PowerEnjoy would decide to apply a fee for the termination of a reservation, + it would be very easy to modify this value. + If the user picks up the car, his reservation terminates and the system + will create another object Rent: no fees will be applied to transform a + reservation into a rent. + On the other hand, if the reservation expires before the user picks up + the car, the system will apply to him a fee of one euro. + \end_layout \end_inset @@ -2720,7 +7190,7 @@ This is a cool description \begin_layout Plain Layout \shape slanted -Input +Input Specification \end_layout \end_inset @@ -2738,7 +7208,7 @@ Effect - + \begin_inset Text \begin_layout Plain Layout @@ -2747,13 +7217,33 @@ A null parameter \end_inset - + \begin_inset Text \begin_layout Plain Layout A NullArgumentException is raised. \end_layout +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +An invalid object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +An InvalidArgumentException is raised. +\end_layout + \end_inset @@ -2762,7 +7252,7 @@ A NullArgumentException is raised. \begin_inset Text \begin_layout Plain Layout -A non-null user +A valid Reservation object \end_layout \end_inset @@ -2771,7 +7261,8 @@ A non-null user \begin_inset Text \begin_layout Plain Layout -The user data are correctly inserted in the database. +A payment request to an external service is successfully sent for the User + related to the current Reservation. \end_layout \end_inset @@ -2805,7 +7296,7 @@ The user data are correctly inserted in the database. \align center \begin_inset Tabular - + @@ -2814,7 +7305,7 @@ The user data are correctly inserted in the database. \begin_layout Plain Layout \family typewriter -register +calculateRentFees(Rent) \end_layout \end_inset @@ -2826,12 +7317,12 @@ register \begin_layout Plain Layout \begin_inset Tabular - + - - + + - + \begin_inset Text \begin_layout Plain Layout @@ -2842,11 +7333,15 @@ Description \end_inset - + \begin_inset Text \begin_layout Plain Layout -This is a cool description +This function will calculate the fees for each Rent entity. + In this case we have to consider eventual discounts and other additional + fees before sending the payment request to the external payment service. + It would not be difficult in the future to change some parameters according + to the PowerEnjoy policy. \end_layout \end_inset @@ -2859,7 +7354,7 @@ This is a cool description \begin_layout Plain Layout \shape slanted -Input +Input Specification \end_layout \end_inset @@ -2877,7 +7372,7 @@ Effect - + \begin_inset Text \begin_layout Plain Layout @@ -2886,13 +7381,33 @@ A null parameter \end_inset - + \begin_inset Text \begin_layout Plain Layout A NullArgumentException is raised. \end_layout +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +An invalid object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +An InvalidArgumentException is raised. +\end_layout + \end_inset @@ -2901,7 +7416,7 @@ A NullArgumentException is raised. \begin_inset Text \begin_layout Plain Layout -A non-null user +A valid Rent object \end_layout \end_inset @@ -2910,7 +7425,329 @@ A non-null user \begin_inset Text \begin_layout Plain Layout -The user data are correctly inserted in the database. +This function first update the total cost of the Rent and then send a payment + request to an external service for the User related to the current Rent. +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset VSpace smallskip +\end_inset + + +\end_layout + +\begin_layout Standard +\align center +\begin_inset Tabular + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\family typewriter +calculateRentDiscount(Rent) +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\series bold +Description +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +This function will calculate the eventual discount for each rent entity. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Input Specification +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Effect +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A null parameter +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +A NullArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +An invalid object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +An InvalidArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A valid Rent object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +The total cost of the Rent will be successfully updated according to the + eventual discounts. +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\begin_layout Standard +\begin_inset VSpace smallskip +\end_inset + + +\end_layout + +\begin_layout Standard +\align center +\begin_inset Tabular + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\family typewriter +calculateAdditionalFees(Rent) +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset Tabular + + + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\series bold +Description +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +This function will calculate the eventual additional fees for each rent + entity. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Input Specification +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\shape slanted +Effect +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A null parameter +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +A NullArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +An invalid object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +An InvalidArgumentException is raised. +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +A valid Rent object +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +The total cost of the Rent will be successfully updated according to the + eventual additional fees. \end_layout \end_inset diff --git a/3.Integration Test Plan Document/res/img/Reservation Management 1.png b/3.Integration Test Plan Document/res/img/Reservation Management 1.png index fb73525..8dee1b0 100644 Binary files a/3.Integration Test Plan Document/res/img/Reservation Management 1.png and b/3.Integration Test Plan Document/res/img/Reservation Management 1.png differ diff --git a/3.Integration Test Plan Document/res/img/Reservation Management 2.png b/3.Integration Test Plan Document/res/img/Reservation Management 2.png index c48af03..41dc613 100644 Binary files a/3.Integration Test Plan Document/res/img/Reservation Management 2.png and b/3.Integration Test Plan Document/res/img/Reservation Management 2.png differ