Section 3 #9

Merged
peperunas merged 1 commits from itpd-section3 into master 2017-01-11 18:35:38 +00:00
2 changed files with 785 additions and 733 deletions

View File

@ -3934,7 +3934,7 @@ In this way we would achieve our goal to distribute cars in the smartest
\end_layout \end_layout
\begin_layout Subsection \begin_layout Subsection
How to calculate the Reservation fees How to apply the Reservation fees
\end_layout \end_layout
\begin_layout Standard \begin_layout Standard
@ -3943,7 +3943,7 @@ In this section we will analyze the structure of the code that will handle
\end_layout \end_layout
\begin_layout Subparagraph* \begin_layout Subparagraph*
calculateReservationFees(Reservation) applyReservationFees(Reservation)
\end_layout \end_layout
\begin_layout Standard \begin_layout Standard
@ -3969,16 +3969,16 @@ begin{lstlisting}
\begin_layout Plain Layout \begin_layout Plain Layout
/* This function will calculate the fees for each reservation entity. /* This function will apply the fees for each Reservation entity.
Actually, the user can terminate a reservation for free, but in the future 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, if PowerEnjoy would decide to apply a fee for the termination of a reservation,
it would be very easy to modify this function. it would be very easy to modify this value.
If the user pick up the car, his reservation terminates and the system 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 will create another object Rent: no fees will be applied to transform a
a reservation into a rent. reservation into a rent.
On the other hand, if the reservation expires before the user pick up the On the other hand, if the reservation expires before the user picks up
car, the system will apply to him a fee of one euro. 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 As said before, it would not be difficult in the future also to change
this amount of money. this amount of money.
\end_layout \end_layout
@ -3993,7 +3993,7 @@ begin{lstlisting}
\begin_layout Plain Layout \begin_layout Plain Layout
function calculateReservationFees (Reservation res){ function applyReservationFees (Reservation res){
\end_layout \end_layout
\begin_layout Plain Layout \begin_layout Plain Layout
@ -4304,7 +4304,7 @@ end{lstlisting}
\end_layout \end_layout
\begin_layout Subparagraph* \begin_layout Subparagraph*
calculateAdditionalFee(Rent) calculateAdditionalFees(Rent)
\end_layout \end_layout
\begin_layout Standard \begin_layout Standard
@ -4340,7 +4340,7 @@ begin{lstlisting}
\begin_layout Plain Layout \begin_layout Plain Layout
void function calculateAdditionalFee(Rent ren){ void function calculateAdditionalFees(Rent ren){
\end_layout \end_layout
\begin_layout Plain Layout \begin_layout Plain Layout
@ -4427,7 +4427,7 @@ begin{lstlisting}
\begin_layout Plain Layout \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 In this case we have to consider eventual discounts and other additional
fees before sending the payment request to the external payment service. fees before sending the payment request to the external payment service.
It would not be difficult in the future to change some parameters according 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 \begin_layout Plain Layout
calculateAdditionalFee(ren); calculateAdditionalFees(ren);
\end_layout \end_layout
\begin_layout Plain Layout \begin_layout Plain Layout

File diff suppressed because it is too large Load Diff