diff --git a/1.RASD/Presentazione_RASD/RASD - PRESENTAZIONE.pdf b/1.RASD/Presentazione_RASD/RASD - PRESENTAZIONE.pdf
new file mode 100644
index 0000000..4c5b732
Binary files /dev/null and b/1.RASD/Presentazione_RASD/RASD - PRESENTAZIONE.pdf differ
diff --git a/1.RASD/Presentazione_RASD/RASD - PRESENTAZIONE.ppsx b/1.RASD/Presentazione_RASD/RASD - PRESENTAZIONE.ppsx
new file mode 100644
index 0000000..b320995
Binary files /dev/null and b/1.RASD/Presentazione_RASD/RASD - PRESENTAZIONE.ppsx differ
diff --git a/1.RASD/Presentazione_RASD/RASD - PRESENTAZIONE.pptx b/1.RASD/Presentazione_RASD/RASD - PRESENTAZIONE.pptx
new file mode 100644
index 0000000..2057b97
Binary files /dev/null and b/1.RASD/Presentazione_RASD/RASD - PRESENTAZIONE.pptx differ
diff --git a/1.RASD/Presentazione_RASD/content/Alloy/1.JPG b/1.RASD/Presentazione_RASD/content/Alloy/1.JPG
new file mode 100644
index 0000000..d9f0baa
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Alloy/1.JPG differ
diff --git a/1.RASD/Presentazione_RASD/content/Alloy/1bis.JPG b/1.RASD/Presentazione_RASD/content/Alloy/1bis.JPG
new file mode 100644
index 0000000..bbc92bb
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Alloy/1bis.JPG differ
diff --git a/1.RASD/Presentazione_RASD/content/Alloy/2.JPG b/1.RASD/Presentazione_RASD/content/Alloy/2.JPG
new file mode 100644
index 0000000..067d856
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Alloy/2.JPG differ
diff --git a/1.RASD/Presentazione_RASD/content/Alloy/3.JPG b/1.RASD/Presentazione_RASD/content/Alloy/3.JPG
new file mode 100644
index 0000000..f06d751
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Alloy/3.JPG differ
diff --git a/1.RASD/Presentazione_RASD/content/Alloy/4 Enums.JPG b/1.RASD/Presentazione_RASD/content/Alloy/4 Enums.JPG
new file mode 100644
index 0000000..a52ded0
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Alloy/4 Enums.JPG differ
diff --git a/1.RASD/Presentazione_RASD/content/Alloy/5.JPG b/1.RASD/Presentazione_RASD/content/Alloy/5.JPG
new file mode 100644
index 0000000..b53354a
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Alloy/5.JPG differ
diff --git a/1.RASD/Presentazione_RASD/content/Alloy/6.JPG b/1.RASD/Presentazione_RASD/content/Alloy/6.JPG
new file mode 100644
index 0000000..6ac3826
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Alloy/6.JPG differ
diff --git a/1.RASD/Presentazione_RASD/content/Alloy/7.JPG b/1.RASD/Presentazione_RASD/content/Alloy/7.JPG
new file mode 100644
index 0000000..534df63
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Alloy/7.JPG differ
diff --git a/1.RASD/Presentazione_RASD/content/Alloy/8.JPG b/1.RASD/Presentazione_RASD/content/Alloy/8.JPG
new file mode 100644
index 0000000..bc8c216
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Alloy/8.JPG differ
diff --git a/1.RASD/Presentazione_RASD/content/Alloy/99.JPG b/1.RASD/Presentazione_RASD/content/Alloy/99.JPG
new file mode 100644
index 0000000..95b7929
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Alloy/99.JPG differ
diff --git a/1.RASD/Presentazione_RASD/content/Alloy/999.JPG b/1.RASD/Presentazione_RASD/content/Alloy/999.JPG
new file mode 100644
index 0000000..946dd72
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Alloy/999.JPG differ
diff --git a/1.RASD/Presentazione_RASD/content/Alloy/9999.JPG b/1.RASD/Presentazione_RASD/content/Alloy/9999.JPG
new file mode 100644
index 0000000..8965c50
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Alloy/9999.JPG differ
diff --git a/1.RASD/Presentazione_RASD/content/Alloy/99999.JPG b/1.RASD/Presentazione_RASD/content/Alloy/99999.JPG
new file mode 100644
index 0000000..0161256
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Alloy/99999.JPG differ
diff --git a/1.RASD/Presentazione_RASD/content/Alloy/RASD - PRESENTAZIONE.wmv b/1.RASD/Presentazione_RASD/content/Alloy/RASD - PRESENTAZIONE.wmv
new file mode 100644
index 0000000..38d120d
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Alloy/RASD - PRESENTAZIONE.wmv differ
diff --git a/1.RASD/Presentazione_RASD/content/Alloy/small scope hypotesys.JPG b/1.RASD/Presentazione_RASD/content/Alloy/small scope hypotesys.JPG
new file mode 100644
index 0000000..f9721ea
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Alloy/small scope hypotesys.JPG differ
diff --git a/1.RASD/Presentazione_RASD/content/Class Diagram/Class.png b/1.RASD/Presentazione_RASD/content/Class Diagram/Class.png
new file mode 100644
index 0000000..2924750
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Class Diagram/Class.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Functional Requirement/1.JPG b/1.RASD/Presentazione_RASD/content/Functional Requirement/1.JPG
new file mode 100644
index 0000000..36e02f9
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Functional Requirement/1.JPG differ
diff --git a/1.RASD/Presentazione_RASD/content/Functional Requirement/2.JPG b/1.RASD/Presentazione_RASD/content/Functional Requirement/2.JPG
new file mode 100644
index 0000000..87a43eb
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Functional Requirement/2.JPG differ
diff --git a/1.RASD/Presentazione_RASD/content/Functional Requirement/3.JPG b/1.RASD/Presentazione_RASD/content/Functional Requirement/3.JPG
new file mode 100644
index 0000000..2b84d9b
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Functional Requirement/3.JPG differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/1.png b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/1.png
new file mode 100644
index 0000000..826206e
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/1.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/10.png b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/10.png
new file mode 100644
index 0000000..2adc127
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/10.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/11.png b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/11.png
new file mode 100644
index 0000000..31b1f1b
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/11.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/12.png b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/12.png
new file mode 100644
index 0000000..a5c432c
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/12.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/13.png b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/13.png
new file mode 100644
index 0000000..2ba46ca
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/13.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/2.png b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/2.png
new file mode 100644
index 0000000..de978e6
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/2.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/3.png b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/3.png
new file mode 100644
index 0000000..7100e00
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/3.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/4.png b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/4.png
new file mode 100644
index 0000000..97303b1
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/4.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/5.png b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/5.png
new file mode 100644
index 0000000..65a22a1
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/5.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/6.png b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/6.png
new file mode 100644
index 0000000..c189ed0
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/6.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/7.png b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/7.png
new file mode 100644
index 0000000..7763152
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/7.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/8.png b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/8.png
new file mode 100644
index 0000000..ca74b7a
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/8.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/9.png b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/9.png
new file mode 100644
index 0000000..4bec91c
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/9.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/Cattura.JPG b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/Cattura.JPG
new file mode 100644
index 0000000..c6a5d09
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Rental/Cattura.JPG differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Unlock/1.png b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Unlock/1.png
new file mode 100644
index 0000000..59358c9
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Unlock/1.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Unlock/2.png b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Unlock/2.png
new file mode 100644
index 0000000..3ccde6c
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Unlock/2.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Unlock/3.png b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Unlock/3.png
new file mode 100644
index 0000000..9ce3ac5
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Unlock/3.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Unlock/4.png b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Unlock/4.png
new file mode 100644
index 0000000..292bfe5
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Unlock/4.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Unlock/5.png b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Unlock/5.png
new file mode 100644
index 0000000..eb6e5ed
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Unlock/5.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Unlock/6.png b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Unlock/6.png
new file mode 100644
index 0000000..62c64a5
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Unlock/6.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Unlock/7.png b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Unlock/7.png
new file mode 100644
index 0000000..57303bf
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Unlock/7.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Unlock/8.png b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Unlock/8.png
new file mode 100644
index 0000000..c37c29e
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Unlock/8.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Unlock/Cattura.JPG b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Unlock/Cattura.JPG
new file mode 100644
index 0000000..9b6cda6
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Car Unlock/Cattura.JPG differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Check Availability/1.png b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Check Availability/1.png
new file mode 100644
index 0000000..0f57ff9
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Check Availability/1.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Check Availability/2.png b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Check Availability/2.png
new file mode 100644
index 0000000..b0c8ec4
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Check Availability/2.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Check Availability/3.png b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Check Availability/3.png
new file mode 100644
index 0000000..8cf7f8f
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Check Availability/3.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Check Availability/4.png b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Check Availability/4.png
new file mode 100644
index 0000000..20c7b1d
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Check Availability/4.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Check Availability/5.png b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Check Availability/5.png
new file mode 100644
index 0000000..6858a49
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Check Availability/5.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Check Availability/6.png b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Check Availability/6.png
new file mode 100644
index 0000000..3057469
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Check Availability/6.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Check Availability/7.png b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Check Availability/7.png
new file mode 100644
index 0000000..ac6658f
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Check Availability/7.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Check Availability/8.png b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Check Availability/8.png
new file mode 100644
index 0000000..039025a
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Check Availability/8.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Check Availability/9.png b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Check Availability/9.png
new file mode 100644
index 0000000..5c5a1f0
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Check Availability/9.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Check Availability/Cattura.JPG b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Check Availability/Cattura.JPG
new file mode 100644
index 0000000..73d48c3
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Check Availability/Cattura.JPG differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Reservation/1.png b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Reservation/1.png
new file mode 100644
index 0000000..80bdb01
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Reservation/1.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Reservation/2.png b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Reservation/2.png
new file mode 100644
index 0000000..e3ecfdf
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Reservation/2.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Reservation/3.png b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Reservation/3.png
new file mode 100644
index 0000000..f976f0c
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Reservation/3.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Reservation/4.png b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Reservation/4.png
new file mode 100644
index 0000000..ee5d587
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Reservation/4.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Reservation/5.png b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Reservation/5.png
new file mode 100644
index 0000000..1a6bc01
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Reservation/5.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Reservation/6.png b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Reservation/6.png
new file mode 100644
index 0000000..97e5c85
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Reservation/6.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Reservation/7.png b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Reservation/7.png
new file mode 100644
index 0000000..93011e6
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Reservation/7.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Reservation/8.png b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Reservation/8.png
new file mode 100644
index 0000000..cb20fb8
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Reservation/8.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Sequence Diagram/Reservation/Cattura.JPG b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Reservation/Cattura.JPG
new file mode 100644
index 0000000..d2a7470
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Sequence Diagram/Reservation/Cattura.JPG differ
diff --git a/1.RASD/Presentazione_RASD/content/Use Case Model/D_User/1.png b/1.RASD/Presentazione_RASD/content/Use Case Model/D_User/1.png
new file mode 100644
index 0000000..2292d17
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Use Case Model/D_User/1.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Use Case Model/D_User/2.png b/1.RASD/Presentazione_RASD/content/Use Case Model/D_User/2.png
new file mode 100644
index 0000000..f9f9a25
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Use Case Model/D_User/2.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Use Case Model/D_User/3 - Copia.png b/1.RASD/Presentazione_RASD/content/Use Case Model/D_User/3 - Copia.png
new file mode 100644
index 0000000..e2b708e
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Use Case Model/D_User/3 - Copia.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Use Case Model/D_User/3.png b/1.RASD/Presentazione_RASD/content/Use Case Model/D_User/3.png
new file mode 100644
index 0000000..e2b708e
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Use Case Model/D_User/3.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Use Case Model/D_User/4.png b/1.RASD/Presentazione_RASD/content/Use Case Model/D_User/4.png
new file mode 100644
index 0000000..dca1344
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Use Case Model/D_User/4.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Use Case Model/D_User/5.png b/1.RASD/Presentazione_RASD/content/Use Case Model/D_User/5.png
new file mode 100644
index 0000000..54d7b84
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Use Case Model/D_User/5.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Use Case Model/GUEST/1.png b/1.RASD/Presentazione_RASD/content/Use Case Model/GUEST/1.png
new file mode 100644
index 0000000..8ddabad
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Use Case Model/GUEST/1.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Use Case Model/GUEST/2.png b/1.RASD/Presentazione_RASD/content/Use Case Model/GUEST/2.png
new file mode 100644
index 0000000..eda95b3
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Use Case Model/GUEST/2.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Use Case Model/GUEST/3.png b/1.RASD/Presentazione_RASD/content/Use Case Model/GUEST/3.png
new file mode 100644
index 0000000..7c0d09f
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Use Case Model/GUEST/3.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Use Case Model/GUEST/4.png b/1.RASD/Presentazione_RASD/content/Use Case Model/GUEST/4.png
new file mode 100644
index 0000000..da20e9a
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Use Case Model/GUEST/4.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Use Case Model/User/1.png b/1.RASD/Presentazione_RASD/content/Use Case Model/User/1.png
new file mode 100644
index 0000000..477c4e3
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Use Case Model/User/1.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Use Case Model/User/2.png b/1.RASD/Presentazione_RASD/content/Use Case Model/User/2.png
new file mode 100644
index 0000000..52c1826
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Use Case Model/User/2.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Use Case Model/User/3.png b/1.RASD/Presentazione_RASD/content/Use Case Model/User/3.png
new file mode 100644
index 0000000..5392a21
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Use Case Model/User/3.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Use Case Model/User/4.png b/1.RASD/Presentazione_RASD/content/Use Case Model/User/4.png
new file mode 100644
index 0000000..8420a38
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Use Case Model/User/4.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Use Case Model/User/5.png b/1.RASD/Presentazione_RASD/content/Use Case Model/User/5.png
new file mode 100644
index 0000000..44c3ffd
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Use Case Model/User/5.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Use Case Model/User/6.png b/1.RASD/Presentazione_RASD/content/Use Case Model/User/6.png
new file mode 100644
index 0000000..91cab33
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Use Case Model/User/6.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Use Case Model/User/7.png b/1.RASD/Presentazione_RASD/content/Use Case Model/User/7.png
new file mode 100644
index 0000000..d1b2392
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Use Case Model/User/7.png differ
diff --git a/1.RASD/Presentazione_RASD/content/Use Case Model/User/8.png b/1.RASD/Presentazione_RASD/content/Use Case Model/User/8.png
new file mode 100644
index 0000000..ae73351
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/Use Case Model/User/8.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/1479270664_Old-Car-2.png b/1.RASD/Presentazione_RASD/content/png/1479270664_Old-Car-2.png
new file mode 100644
index 0000000..0fd7305
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/1479270664_Old-Car-2.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/businessman.png b/1.RASD/Presentazione_RASD/content/png/businessman.png
new file mode 100644
index 0000000..e82adda
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/businessman.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/businesswoman.png b/1.RASD/Presentazione_RASD/content/png/businesswoman.png
new file mode 100644
index 0000000..d64fbcb
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/businesswoman.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/man-1.png b/1.RASD/Presentazione_RASD/content/png/man-1.png
new file mode 100644
index 0000000..e3cc938
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/man-1.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/man-10.png b/1.RASD/Presentazione_RASD/content/png/man-10.png
new file mode 100644
index 0000000..ddd6eca
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/man-10.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/man-11.png b/1.RASD/Presentazione_RASD/content/png/man-11.png
new file mode 100644
index 0000000..012bcc0
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/man-11.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/man-12.png b/1.RASD/Presentazione_RASD/content/png/man-12.png
new file mode 100644
index 0000000..abaaa56
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/man-12.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/man-13.png b/1.RASD/Presentazione_RASD/content/png/man-13.png
new file mode 100644
index 0000000..b3277d7
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/man-13.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/man-14.png b/1.RASD/Presentazione_RASD/content/png/man-14.png
new file mode 100644
index 0000000..c76b219
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/man-14.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/man-15.png b/1.RASD/Presentazione_RASD/content/png/man-15.png
new file mode 100644
index 0000000..b024828
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/man-15.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/man-16.png b/1.RASD/Presentazione_RASD/content/png/man-16.png
new file mode 100644
index 0000000..7b712d5
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/man-16.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/man-17.png b/1.RASD/Presentazione_RASD/content/png/man-17.png
new file mode 100644
index 0000000..c8148a2
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/man-17.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/man-18.png b/1.RASD/Presentazione_RASD/content/png/man-18.png
new file mode 100644
index 0000000..3fc15f6
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/man-18.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/man-19.png b/1.RASD/Presentazione_RASD/content/png/man-19.png
new file mode 100644
index 0000000..0829e8b
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/man-19.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/man-2.png b/1.RASD/Presentazione_RASD/content/png/man-2.png
new file mode 100644
index 0000000..9976eac
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/man-2.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/man-20.png b/1.RASD/Presentazione_RASD/content/png/man-20.png
new file mode 100644
index 0000000..8024678
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/man-20.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/man-21.png b/1.RASD/Presentazione_RASD/content/png/man-21.png
new file mode 100644
index 0000000..c4998a3
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/man-21.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/man-22.png b/1.RASD/Presentazione_RASD/content/png/man-22.png
new file mode 100644
index 0000000..bed1247
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/man-22.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/man-23.png b/1.RASD/Presentazione_RASD/content/png/man-23.png
new file mode 100644
index 0000000..bae96ec
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/man-23.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/man-24.png b/1.RASD/Presentazione_RASD/content/png/man-24.png
new file mode 100644
index 0000000..7bc2a75
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/man-24.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/man-25.png b/1.RASD/Presentazione_RASD/content/png/man-25.png
new file mode 100644
index 0000000..5939fc7
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/man-25.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/man-26.png b/1.RASD/Presentazione_RASD/content/png/man-26.png
new file mode 100644
index 0000000..bca463b
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/man-26.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/man-27.png b/1.RASD/Presentazione_RASD/content/png/man-27.png
new file mode 100644
index 0000000..38d3214
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/man-27.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/man-28.png b/1.RASD/Presentazione_RASD/content/png/man-28.png
new file mode 100644
index 0000000..d841f31
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/man-28.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/man-29.png b/1.RASD/Presentazione_RASD/content/png/man-29.png
new file mode 100644
index 0000000..4d4e9cc
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/man-29.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/man-3.png b/1.RASD/Presentazione_RASD/content/png/man-3.png
new file mode 100644
index 0000000..9be2eab
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/man-3.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/man-30.png b/1.RASD/Presentazione_RASD/content/png/man-30.png
new file mode 100644
index 0000000..dfedcb5
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/man-30.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/man-31.png b/1.RASD/Presentazione_RASD/content/png/man-31.png
new file mode 100644
index 0000000..1388174
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/man-31.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/man-32.png b/1.RASD/Presentazione_RASD/content/png/man-32.png
new file mode 100644
index 0000000..dd42f02
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/man-32.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/man-33.png b/1.RASD/Presentazione_RASD/content/png/man-33.png
new file mode 100644
index 0000000..c12f89e
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/man-33.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/man-34.png b/1.RASD/Presentazione_RASD/content/png/man-34.png
new file mode 100644
index 0000000..a923a20
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/man-34.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/man-4.png b/1.RASD/Presentazione_RASD/content/png/man-4.png
new file mode 100644
index 0000000..5e91d3a
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/man-4.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/man-5.png b/1.RASD/Presentazione_RASD/content/png/man-5.png
new file mode 100644
index 0000000..7f04bcb
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/man-5.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/man-6.png b/1.RASD/Presentazione_RASD/content/png/man-6.png
new file mode 100644
index 0000000..efc3ba9
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/man-6.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/man-7.png b/1.RASD/Presentazione_RASD/content/png/man-7.png
new file mode 100644
index 0000000..302f9e1
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/man-7.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/man-8.png b/1.RASD/Presentazione_RASD/content/png/man-8.png
new file mode 100644
index 0000000..6032868
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/man-8.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/man-9.png b/1.RASD/Presentazione_RASD/content/png/man-9.png
new file mode 100644
index 0000000..12e399d
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/man-9.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/man.png b/1.RASD/Presentazione_RASD/content/png/man.png
new file mode 100644
index 0000000..22e7bec
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/man.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/woman-1.png b/1.RASD/Presentazione_RASD/content/png/woman-1.png
new file mode 100644
index 0000000..2c49b34
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/woman-1.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/woman-10.png b/1.RASD/Presentazione_RASD/content/png/woman-10.png
new file mode 100644
index 0000000..fd3ddd9
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/woman-10.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/woman-11.png b/1.RASD/Presentazione_RASD/content/png/woman-11.png
new file mode 100644
index 0000000..236a6a8
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/woman-11.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/woman-12.png b/1.RASD/Presentazione_RASD/content/png/woman-12.png
new file mode 100644
index 0000000..2991b94
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/woman-12.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/woman-2.png b/1.RASD/Presentazione_RASD/content/png/woman-2.png
new file mode 100644
index 0000000..9498c95
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/woman-2.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/woman-3.png b/1.RASD/Presentazione_RASD/content/png/woman-3.png
new file mode 100644
index 0000000..72cf739
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/woman-3.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/woman-4.png b/1.RASD/Presentazione_RASD/content/png/woman-4.png
new file mode 100644
index 0000000..7ff8249
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/woman-4.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/woman-5.png b/1.RASD/Presentazione_RASD/content/png/woman-5.png
new file mode 100644
index 0000000..e67060c
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/woman-5.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/woman-6.png b/1.RASD/Presentazione_RASD/content/png/woman-6.png
new file mode 100644
index 0000000..46b270c
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/woman-6.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/woman-7.png b/1.RASD/Presentazione_RASD/content/png/woman-7.png
new file mode 100644
index 0000000..a516c7a
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/woman-7.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/woman-8.png b/1.RASD/Presentazione_RASD/content/png/woman-8.png
new file mode 100644
index 0000000..a75668e
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/woman-8.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/woman-9.png b/1.RASD/Presentazione_RASD/content/png/woman-9.png
new file mode 100644
index 0000000..5443923
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/woman-9.png differ
diff --git a/1.RASD/Presentazione_RASD/content/png/woman.png b/1.RASD/Presentazione_RASD/content/png/woman.png
new file mode 100644
index 0000000..0ab1774
Binary files /dev/null and b/1.RASD/Presentazione_RASD/content/png/woman.png differ
diff --git a/1.RASD/RASD.lyx b/1.RASD/RASD.lyx
new file mode 100644
index 0000000..cbabab1
--- /dev/null
+++ b/1.RASD/RASD.lyx
@@ -0,0 +1,5382 @@
+#LyX 2.2 created this file. For more info see http://www.lyx.org/
+\lyxformat 508
+\begin_document
+\begin_header
+\save_transient_properties true
+\origin unavailable
+\textclass article
+\begin_preamble
+\usepackage{listings}
+\usepackage{xcolor}
+\usepackage{pdflscape}
+\usepackage{courier}
+%\usepackage{mathtools}
+\usepackage{graphicx}
+\usepackage{booktabs}
+\usepackage[T1]{fontenc}
+\usepackage{lmodern}
+
+\usepackage{listings}
+\lstset{columns=fullflexible}
+
+\usepackage{charter}
+
+\usepackage{xspace}
+
+
+
+% Definizione intestazioni e pie' di pagina
+\usepackage{fancyhdr}
+\end_preamble
+\use_default_options true
+\begin_modules
+InStar
+graphicboxes
+fix-cm
+fixltx2e
+fixme
+customHeadersFooters
+pdfform
+\end_modules
+\maintain_unincluded_children false
+\begin_forced_local_layout
+Format 60
+Style "In Preamble"
+ Category "FrontMatter"
+ Margin Static
+ LatexType Paragraph
+ InTitle 0
+ InPreamble 1
+ TocLevel -1000
+ NeedProtect 0
+ KeepEmpty 0
+ NextNoIndent 0
+ CommandDepth 0
+ LatexName "dummy"
+ ItemCommand item
+ LabelType No_Label
+ EndLabelType No_Label
+ ParagraphGroup "0"
+ ParIndent MM
+ ParSkip 0.4
+ ItemSep 0
+ TopSep 0
+ BottomSep 0
+ LabelBottomSep 0
+ ParSep 0
+ NewLine 1
+ Align Block
+ AlignPossible Block, Center, Layout, Left, Right
+ FreeSpacing 0
+ PassThru 0
+ ParbreakIsNewline 0
+ RefPrefix OFF
+ HTMLLabelFirst 0
+ HTMLStyle
+div.standard {
+margin-bottom: 2ex;
+}
+ EndHTMLStyle
+ HTMLForceCSS 0
+ HTMLTitle 0
+ Spellcheck 1
+ ForceLocal 1
+End
+Style "In Title"
+ Category "FrontMatter"
+ Margin Static
+ LatexType Paragraph
+ InTitle 1
+ InPreamble 0
+ TocLevel -1000
+ NeedProtect 0
+ KeepEmpty 0
+ NextNoIndent 0
+ CommandDepth 0
+ LatexName "dummy"
+ ItemCommand item
+ LabelType No_Label
+ EndLabelType No_Label
+ ParagraphGroup "0"
+ ParIndent MM
+ ParSkip 0.4
+ ItemSep 0
+ TopSep 0
+ BottomSep 0
+ LabelBottomSep 0
+ ParSep 0
+ NewLine 1
+ Align Block
+ AlignPossible Block, Center, Layout, Left, Right
+ FreeSpacing 0
+ PassThru 0
+ ParbreakIsNewline 0
+ RefPrefix OFF
+ HTMLLabelFirst 0
+ HTMLStyle
+div.standard {
+margin-bottom: 2ex;
+}
+ EndHTMLStyle
+ HTMLForceCSS 0
+ HTMLTitle 0
+ Spellcheck 1
+ ForceLocal 1
+End
+\end_forced_local_layout
+\language english
+\language_package default
+\inputencoding auto
+\fontencoding global
+\font_roman "default" "default"
+\font_sans "default" "default"
+\font_typewriter "default" "default"
+\font_math "auto" "auto"
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_osf false
+\font_sf_scale 100 100
+\font_tt_scale 100 100
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\float_placement H
+\paperfontsize default
+\spacing single
+\use_hyperref true
+\pdf_bookmarks true
+\pdf_bookmarksnumbered false
+\pdf_bookmarksopen false
+\pdf_bookmarksopenlevel 1
+\pdf_breaklinks false
+\pdf_pdfborder false
+\pdf_colorlinks false
+\pdf_backref false
+\pdf_pdfusetitle true
+\papersize default
+\use_geometry true
+\use_package amsmath 1
+\use_package amssymb 1
+\use_package cancel 1
+\use_package esint 1
+\use_package mathdots 1
+\use_package mathtools 1
+\use_package mhchem 1
+\use_package stackrel 1
+\use_package stmaryrd 1
+\use_package undertilde 1
+\cite_engine basic
+\cite_engine_type default
+\biblio_style plain
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\justification true
+\use_refstyle 1
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\leftmargin 2.5cm
+\rightmargin 2.5cm
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\quotes_language english
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\end_header
+
+\begin_body
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{titlepage}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+
+\backslash
+newcommand{
+\backslash
+HRule}{
+\backslash
+rule{
+\backslash
+linewidth}{0.5mm}}
+\end_layout
+
+\begin_layout Plain Layout
+
+
+\backslash
+center
+\end_layout
+
+\begin_layout Plain Layout
+
+
+\backslash
+textsc{
+\backslash
+LARGE Politecnico di Milano}
+\backslash
+
+\backslash
+[1.5cm]
+\backslash
+textsc{
+\backslash
+Large PowerEnjoy}
+\backslash
+
+\backslash
+[0.5cm]
+\end_layout
+
+\begin_layout Plain Layout
+
+
+\backslash
+textsc{
+\backslash
+Large Software Engineering 2}
+\backslash
+
+\backslash
+[0.5cm]
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+
+\backslash
+HRule
+\backslash
+
+\backslash
+[0.4cm] {
+\backslash
+huge
+\backslash
+bfseries Requirements Analysis and
+\backslash
+
+\backslash
+ Specification Document}
+\backslash
+
+\backslash
+[0.4cm]
+\backslash
+HRule
+\backslash
+
+\backslash
+[1.5cm]
+\end_layout
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{minipage}{0.4
+\backslash
+textwidth}
+\backslash
+begin{flushleft}
+\backslash
+large
+\backslash
+emph{Authors:}
+\backslash
+
+\backslash
+ Giancarlo
+\backslash
+textsc{Colaci}
+\backslash
+newline Giulio
+\backslash
+textsc{De Pasquale}
+\backslash
+newline Francesco
+\backslash
+textsc{Rinaldi}
+\backslash
+end{flushleft}
+\backslash
+end{minipage} ~
+\backslash
+begin{minipage}{0.4
+\backslash
+textwidth}
+\backslash
+begin{flushright}
+\backslash
+large
+\backslash
+emph{Supervisor:}
+\backslash
+
+\backslash
+ Elisabetta
+\backslash
+textsc{De Nitto}
+\backslash
+end{flushright}
+\backslash
+end{minipage}
+\backslash
+
+\backslash
+[3cm]
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Graphics
+ filename res/img/logopm.pdf
+ width 30text%
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vfill
+\end_layout
+
+\begin_layout Plain Layout
+
+{
+\backslash
+large
+\backslash
+today}
+\backslash
+
+\backslash
+[3cm]
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{titlepage}
+\end_layout
+
+\end_inset
+
+
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+mbox{}
+\backslash
+thispagestyle{empty}
+\backslash
+newpage
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset toc
+LatexCommand tableofcontents
+
+\end_inset
+
+
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+thispagestyle{empty}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+setcounter{page}{1}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Correction to the RASD
+\end_layout
+
+\begin_layout Subsection
+Rasd Version 1.1
+\end_layout
+
+\begin_layout Standard
+While writing the Design Document, we found necessary to make some modifications
+ to the RASD.
+ This is why we wrote the second version of the document.
+ Here there are the updates we did:
+\end_layout
+
+\begin_layout Itemize
+In the previous RASD we didn't specify that the Customer Service is an outsource
+d service, and so in this document and in the following documents we won't
+ implement it;
+\end_layout
+
+\begin_layout Itemize
+We introduced a new functional requirement: modify the profile information.
+
+\end_layout
+
+\begin_layout Section
+Introduction
+\end_layout
+
+\begin_layout Subsection
+Description of the given problem
+\end_layout
+
+\begin_layout Standard
+We will project and implement PowerEnjoy, which is a new car-sharing service
+ that exclusively employs electric cars.
+ The system that will be developed has to allow the registration of a new
+ user with all his personal information (like name, age, driving license
+ and credit card information), log in credentials and the possibility to
+ find the locations of available cars within a certain distance from his
+ current location or from a specified address.
+ Moreover, according to some policies (specified later) the user can obtain
+ exclusive discounts and offers.
+\end_layout
+
+\begin_layout Subsection
+Purpose
+\end_layout
+
+\begin_layout Standard
+The principal purpose of this document, the Requirement Analysis and Specificatio
+n Document, is to show the functional and non-functional requirements of
+ the system-to-be.
+ They will be based on different aspects: the needs expressed by the stakeholder
+s, the constraints which it is subject to, the typical scenarios that will
+ happen after its deployment.
+ The targeted audience in this case will be mainly made of software engineers
+ and developers who have to actually develop the service here described.
+\end_layout
+
+\begin_layout Subsection
+Scope
+\end_layout
+
+\begin_layout Standard
+The system will be an optimization of a pre-existing system for renting
+ electric cars already in use in some cities.
+ The new system will let users to check reservability and status of available
+ cars, rent or reserve them through a mobile or a web application in a more
+ simple and effective way.
+ In addition to a better user interface, the new system will guarantee a
+ smarter uniform distribution of cars in the city, in order to offer a better
+ service for the citizens, and will also offer some special discount, in
+ order to incentivize the virtuous behaviors of the users.
+\end_layout
+
+\begin_layout Subsection
+Goals
+\end_layout
+
+\begin_layout Standard
+PowerEnJoy's users will be able to:
+\end_layout
+
+\begin_layout Itemize
+register themselves to the system;
+\end_layout
+
+\begin_layout Itemize
+log into the system;
+\end_layout
+
+\begin_layout Itemize
+find the location of available cars in a specified area;
+\end_layout
+
+\begin_layout Itemize
+book a car with the possibility to cancel the reservation;
+\end_layout
+
+\begin_layout Itemize
+open his / her reserved car;
+\end_layout
+
+\begin_layout Itemize
+be notified of active reservation status;
+\end_layout
+
+\begin_layout Itemize
+end the rental;
+\end_layout
+
+\begin_layout Itemize
+know the total cost at the end of the lease;
+\end_layout
+
+\begin_layout Subsection
+Stakeholders
+\end_layout
+
+\begin_layout Standard
+Our primary stakeholder is the professor who gave us this didactical project.
+ Our stakeholder's main need is to review the complete project at the end
+ of the semester.
+ Our objective is to show him/her we have followed the development process
+ in all its parts and that we are able to carry out a challenging task from
+ the beginning to the end fully comprehending all its internal phases.
+ We want to show that we can identify key requirements and specifications,
+ design and test our web/mobile application while providing all documentation
+ backing up the source code.
+ Finally, our typical users will be people that don’t have a car or that
+ prefer to rent a car instead of a public service transportation to go around
+ the city.
+\end_layout
+
+\begin_layout Subsection
+Glossary
+\end_layout
+
+\begin_layout Standard
+Below there are definitions of some terms that will be used in the document,
+ in order to avoid any ambiguity in their use and their understanding.
+\end_layout
+
+\begin_layout Description
+Guest: a person that has never signed up to the system.
+ He can only sign up and view available cars
+\end_layout
+
+\begin_layout Description
+User: a person already registered in the system who can log in and has a
+ personal profile and can use all the functionalities described.
+ Unless specified, each user is active: therefore can use the service with
+ no restrictions
+\end_layout
+
+\begin_layout Description
+Deactivated
+\begin_inset space ~
+\end_inset
+
+user: a user with revoked privileges.
+ He/she cannot use the service until the issues with his/her account are
+ solved (e.g., expired license)
+\end_layout
+
+\begin_layout Description
+Login: the action of accessing the system via a username and related password
+\end_layout
+
+\begin_layout Description
+Notification: a real-time alert that warns a user when there are updates
+ about what he is dealing with
+\end_layout
+
+\begin_layout Description
+Reservation: the action performed by the registered user when he chooses
+ to drive an available car.
+ It expires as soon as one of these conditions is met: one hour is elapsed
+ from the user's reservation request or the car is unlocked
+\end_layout
+
+\begin_layout Description
+Rent: the temporary possession and use of one of the PowerEnjoy's cars in
+ return for payment by a user.
+ It starts once a minute is elapsed from the car doors unlock or the engine
+ is ignited and lasts until the doors are re-locked by the system
+\end_layout
+
+\begin_layout Description
+Available: a fully functional car ready to be used by a registered user
+\end_layout
+
+\begin_layout Description
+Unavailable: a car which is currently reserved or used by a registered user
+ or is not entirely working (e.g.
+ exhausted battery, mechanical damage)
+\end_layout
+
+\begin_layout Description
+Reservable: an available car located in a geographical region where a registered
+ user is enabled to reserve it
+\end_layout
+
+\begin_layout Description
+Parking
+\begin_inset space ~
+\end_inset
+
+area: circumscribed public area where cars can be parked (e.g.
+ no parking lots).
+ The set of safe areas for parking cars is pre-defined by the management
+ system.
+\end_layout
+
+\begin_layout Description
+Recharging
+\begin_inset space ~
+\end_inset
+
+area: it is included in the parking area; cars parked here can also be recharged
+ thanks to several charging stations
+\end_layout
+
+\begin_layout Description
+Special
+\begin_inset space ~
+\end_inset
+
+area: specific recharging areas decided by the system to ensure a uniform
+ distribution of cars in the city
+\end_layout
+
+\begin_layout Description
+RMSS: Request Management Sub-System, it is an already developed part of
+ our system which stores and manages all the information about the PowerEnjoy's
+ cars, users and about their request (reservation or rent).
+\end_layout
+
+\begin_layout Description
+MES: Maintenance External Service, it is an external service that takes
+ care of ordinary or extraordinary car maintenance.
+\end_layout
+
+\begin_layout Description
+ADS: Auto Diagnosis System, an always on embedded peripheral which continuously
+ monitors the status of the car (e.g.
+ battery charge, tires pressure, impact detection)
+\end_layout
+
+\begin_layout Description
+ECS: Emergency Call System, an always on embedded peripheral which can be
+ used to call the consumer service or an emergency number quickly
+\end_layout
+
+\begin_layout Description
+Verification
+\begin_inset space ~
+\end_inset
+
+code: it is a four digits code chosen by the user during the registration
+ procedure that adds another level of security to our service; the user
+ will need it to unlock the car
+\end_layout
+
+\begin_layout Description
+Countdown: it is the time given to the user to pick-up the reserved car
+ before the reservation expires (during this period the reservation is active)
+\end_layout
+
+\begin_layout Description
+EULA: End User License Agreement
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Overall Description
+\end_layout
+
+\begin_layout Subsection
+Proposed System
+\end_layout
+
+\begin_layout Standard
+The server-side implementation will be structured through a net of micro-service
+s mainly written in Python and managed through Docker.
+ The server will run the business logic, host PowerEnjoy's website, and
+ users' data.
+ Besides, we propose a web/mobile application which allows to registered
+ users to use PowerEnjoy's services.
+ The web client will use Python/Javascript and HTML5/CSS for web pages generatio
+n and formatting respectively.
+ We will also use open-source libraries such as Flask to speed up the developmen
+t.
+ The mobile applications will be deployed on the main platforms currently
+ available (iOS, Android, Windows Phone) and will be written accordingly
+ to each devices' programming language.
+ Client-server communication will be platform agnostic since it will happen
+ through an encrypted RESTful API which returns its data through JSON.
+\end_layout
+
+\begin_layout Subsection
+Domain Properties
+\end_layout
+
+\begin_layout Standard
+We suppose these conditions will be respected at any given time:
+\end_layout
+
+\begin_layout Itemize
+the user will request help only if he/she needs it;
+\end_layout
+
+\begin_layout Itemize
+the user will never try to exploit the system's features (e.g.
+ sleep in the car);
+\end_layout
+
+\begin_layout Itemize
+the user will never fake his/her position to cause a denial of service;
+
+\end_layout
+
+\begin_layout Itemize
+the user will only provide correct and authentic information while signing
+ up;
+\end_layout
+
+\begin_layout Itemize
+a booked car will always be driven by the user who reserved it;
+\end_layout
+
+\begin_layout Itemize
+the user will never be robbed of the access credentials and the verification
+ code;
+\end_layout
+
+\begin_layout Itemize
+the user agrees to be geolocalized;
+\end_layout
+
+\begin_layout Itemize
+each available car is fully functional;
+\end_layout
+
+\begin_layout Itemize
+each car has an embedded key to turn on the engine;
+\end_layout
+
+\begin_layout Itemize
+each car is equipped with a properly working ADS and an ECS;
+\end_layout
+
+\begin_layout Itemize
+each car is fitted with a properly working notification touchscreen display;
+\end_layout
+
+\begin_layout Itemize
+an available car will always be found in the supposed position;
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage pagebreak
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Assumptions
+\end_layout
+
+\begin_layout Standard
+This section explores some of the vague concepts or loosely explained ones:
+ further hypotheses have been added to expand the description of the requirement
+s and to account better for the interaction between the external environment
+ and the developed application.
+\end_layout
+
+\begin_layout Standard
+Due to some unclear points in the specification we made some assumptions,
+ which are:
+\end_layout
+
+\begin_layout Itemize
+the system allows users to locate any car in PowerEnjoy's area of operation;
+\end_layout
+
+\begin_layout Itemize
+the system's money saving option has to be enabled or disabled in the user
+ profile;
+\end_layout
+
+\begin_layout Itemize
+the system permits users to reserve an available car only in his/her city;
+\end_layout
+
+\begin_deeper
+\begin_layout Itemize
+with "a certain geographical region" we mean that the user can reach the
+ vehicle in a reasonable amount of time;
+\end_layout
+
+\end_deeper
+\begin_layout Itemize
+the system can locate its users through Cellular Data or GPS;
+\end_layout
+
+\begin_layout Itemize
+the system's proximity check is done through one of these: numerical code
+ on each cars' windshield or GPS data from user's phone;
+\end_layout
+
+\begin_layout Itemize
+the fees are applied as soon as one of these conditions is met: one minute
+ is elapsed from the car's doors opening, or the engine is revved;
+\end_layout
+
+\begin_layout Itemize
+each seat is equipped with a sensor which is used to detect the number of
+ passengers into each car;
+\end_layout
+
+\begin_layout Itemize
+each user can't reserve more than one car at the same time;
+\end_layout
+
+\begin_layout Itemize
+to be eligible for the 10% discount, almost two passengers have to remain
+ seated at the same time for at least one minute;
+\end_layout
+
+\begin_layout Itemize
+if a car is parked in a special area, the discount equals to 40%;
+\end_layout
+
+\begin_layout Subsection
+Actors Identifying
+\end_layout
+
+\begin_layout Standard
+The system provides the interaction of two different types of actors who
+ can use different functionalities of the application system.
+ The types are set out below along with a brief description of their privileges.
+\end_layout
+
+\begin_layout Subsubsection
+Guest
+\end_layout
+
+\begin_layout Standard
+A person that is not registered (yet!) so can check for cars' position,
+ register or ask for help/advice.
+\end_layout
+
+\begin_layout Paragraph
+Privileges:
+\end_layout
+
+\begin_layout Itemize
+Register to the system by creating a new account;
+\end_layout
+
+\begin_layout Itemize
+Check available cars' position and status;
+\end_layout
+
+\begin_layout Itemize
+Contact the customer service;
+\end_layout
+
+\begin_layout Subsubsection
+User
+\end_layout
+
+\begin_layout Standard
+A person that is already registered to the system with his personal information;
+ a guest can become a user after the authentication to the system using
+ the login form.
+\end_layout
+
+\begin_layout Paragraph
+Privileges:
+\end_layout
+
+\begin_layout Itemize
+Log into the system;
+\end_layout
+
+\begin_layout Itemize
+Consult reservations' history;
+\end_layout
+
+\begin_layout Itemize
+Edit account information:
+\end_layout
+
+\begin_deeper
+\begin_layout Itemize
+personal and billing data;
+\end_layout
+
+\begin_layout Itemize
+enable/disable money saving option;
+\end_layout
+
+\end_deeper
+\begin_layout Itemize
+Check available cars' position and status;
+\end_layout
+
+\begin_layout Itemize
+Reserve a reservable car;
+\end_layout
+
+\begin_layout Itemize
+Rent the reserved car;
+\end_layout
+
+\begin_layout Itemize
+Check active reservation status:
+\end_layout
+
+\begin_deeper
+\begin_layout Itemize
+Remaining time until the reservation expires;
+\end_layout
+
+\begin_layout Itemize
+Reserved car's position and status;
+\end_layout
+
+\begin_layout Itemize
+Elapsed rental time;
+\end_layout
+
+\end_deeper
+\begin_layout Itemize
+Request help through the ECS;
+\end_layout
+
+\begin_layout Itemize
+Terminate the rent;
+\end_layout
+
+\begin_layout Itemize
+Contact the customer service;
+\end_layout
+
+\begin_layout Subsubsection
+Deactivated User
+\end_layout
+
+\begin_layout Standard
+A user with revoked privileges.
+ He/she cannot use the service until the issues with his/her account are
+ solved (e.g expired license).
+\end_layout
+
+\begin_layout Paragraph
+Privileges:
+\end_layout
+
+\begin_layout Itemize
+Log into the system;
+\end_layout
+
+\begin_layout Itemize
+Consult reservations' history;
+\end_layout
+
+\begin_layout Itemize
+Edit account information:
+\end_layout
+
+\begin_deeper
+\begin_layout Itemize
+personal and billing data;
+\end_layout
+
+\begin_layout Itemize
+enable/disable money saving option;
+\end_layout
+
+\end_deeper
+\begin_layout Itemize
+Check available cars' position and status;
+\end_layout
+
+\begin_layout Itemize
+Contact the customer service;
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Specific Requirements
+\end_layout
+
+\begin_layout Standard
+In this section will be analyzed in detail functional and non-functional
+ requirements that the system developed has to satisfy, when the domain
+ properties previously denoted hold and referring to the declared goals.
+\end_layout
+
+\begin_layout Subsection
+Functional requirements
+\end_layout
+
+\begin_layout Standard
+The functional requirements include the functionalities that the system
+ must necessarily have and describe the interactions between the system
+ developed and the external environment independently from the implementation.
+\end_layout
+
+\begin_layout Enumerate
+Registration of a guest to the system:
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+The system has to guarantee the registration to a new user by creating a
+ new account.
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+Login of a user into the system:
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+The system has to allow the login to an already registered user when he
+ types the correct username and the password in the login form.
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+Find the location of available cars in a specified area:
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+The system has to allow both guests and users to specify the address where
+ they want to locate an available car or to use their position;
+\end_layout
+
+\begin_layout Enumerate
+The system has to guarantee that a car is showed on the map if and only
+ if it is available (that means that every available car is showed and that
+ every showed car is available);
+\end_layout
+
+\begin_layout Enumerate
+The system has to guarantee that the car's position is regularly showed
+ up to date.
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+Book a car with the possibility to cancel the reservation:
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+The system has to guarantee that only a user (i.e.
+ not a guest) can reserve a car;
+\end_layout
+
+\begin_layout Enumerate
+The system must be able to check the position of the user;
+\end_layout
+
+\begin_layout Enumerate
+The system has to guarantee that any user can reserve only one car at a
+ time;
+\end_layout
+
+\begin_layout Enumerate
+The system has to ensure that the same car cannot be reserved at the same
+ time by different users;
+\end_layout
+
+\begin_layout Enumerate
+The system has to guarantee that any user can have at most an active reservation
+;
+\end_layout
+
+\begin_layout Enumerate
+The system has to guarantee that every reservable car is available;
+\end_layout
+
+\begin_layout Enumerate
+The system has to ensure that only a reservable car can be reserved;
+\end_layout
+
+\begin_layout Enumerate
+The system has to guarantee that when a user reserves a car, the latter
+ is no more available;
+\end_layout
+
+\begin_layout Enumerate
+The system has to ensure that only an active reservation can expire or be
+ canceled;
+\end_layout
+
+\begin_layout Enumerate
+The system has to make sure that when a reservation expires or is revoked,
+ the car becomes available again;
+\end_layout
+
+\begin_layout Enumerate
+When a reservation is activated, the system starts a countdown at the end
+ of which the reservation expires if the user did not pick-up the reserved
+ car;
+\begin_inset Newpage pagebreak
+\end_inset
+
+
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+Open his/her reserved car;
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+The system must be able to check the proximity of the user to the reserved
+ car;
+\end_layout
+
+\begin_layout Enumerate
+The system must be able to check if the money saving option is enabled for
+ the current reservation;
+\end_layout
+
+\begin_layout Enumerate
+The system has to allow the user to insert the verification code;
+\end_layout
+
+\begin_layout Enumerate
+The system has to unlock the reserved car only if the entered verification
+ code is correct;
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+Be notified of active reservation status:
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+The system must be able to retrieve the starting time of the rental;
+\end_layout
+
+\begin_layout Enumerate
+The system must be able to calculate and notify the elapsed time of the
+ rental periodically;
+\end_layout
+
+\begin_layout Enumerate
+The system must be able to communicate with every grid power station to
+ check their power plugs' availability;
+\end_layout
+
+\begin_layout Enumerate
+The system, to ensure a uniform distribution of parked cars, must be able
+ to notify the user the nearest selected station where to leave the car
+ to get a discount only if he/she inputs a destination and the money saving
+ option is active;
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+End the rental:
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+The system has to allow the user to communicate that he/she wants to terminate
+ the rental using the car's display;
+\end_layout
+
+\begin_layout Enumerate
+The system has to allow the user to end the rental only if he is in a safe
+ parking area;
+\end_layout
+
+\begin_layout Enumerate
+The system has to guarantee that when a reservation is ended, the car becomes
+ available again;
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+Know the total cost at the end of the rental:
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+The system has to communicate with the ADS to retrieve the car status and
+ rental information;
+\end_layout
+
+\begin_layout Enumerate
+The system must be able to apply the discounts, if any, handling the previously
+ retrieved information;
+\end_layout
+
+\begin_layout Enumerate
+The system must communicate to the user the final cost of the rental;
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+Modify the profile information:
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+The system has to allow the user to modify his/her personal information;
+\end_layout
+
+\begin_layout Enumerate
+The system has to allow the user to enable or disable the money saving option;
+\end_layout
+
+\end_deeper
+\begin_layout Subsection
+Non-functional requirements
+\end_layout
+
+\begin_layout Standard
+The non-functional requirements are those not related to the functionality,
+ but rather consider the quality of the system to be implemented (Quality
+ of Service, QoS), regardless of the application domain.
+
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\end_layout
+
+\begin_layout Standard
+Security:
+\end_layout
+
+\begin_layout Itemize
+Each user will only be able to access functionality that competes to his
+ category, and it is, therefore, necessary to provide an authentication
+ method: it will be used the symmetric username/password one.
+ Furthermore, each credential will not be stored in cleartext, and client/server
+ communications will be protected by asymmetric encryption.
+
+\end_layout
+
+\begin_layout Standard
+Portability:
+\end_layout
+
+\begin_layout Itemize
+The client must be compatible with all hardware and software platforms to
+ reach as many users as possible.
+ This requirement is satisfied by realizing the client as a web application,
+ in this way the only assumptions that must be met by users are the availability
+ of a web browser and a connection to the Internet.
+
+\end_layout
+
+\begin_layout Standard
+Stability and reliability:
+\end_layout
+
+\begin_layout Itemize
+The system must notify the user the result of each his/her transaction request
+ while maintaining an optimal level of reliability.
+ Therefore it will be able to face with the possible loss of connection
+ between clients and the central server by ensuring atomicity of all operations.
+\end_layout
+
+\begin_layout Standard
+Performance:
+\end_layout
+
+\begin_layout Itemize
+As for performance, the timing of getting and insertion the information
+ in the database must be acceptable to do not block the whole system.
+
+\end_layout
+
+\begin_layout Standard
+Concurrency management:
+\end_layout
+
+\begin_layout Itemize
+The system must ensure data consistency while dealing with multiple concurrent
+ accesses to the same resource in the database by multiple users authenticated
+ to the system.
+
+\end_layout
+
+\begin_layout Standard
+Graphical User Interfaces (GUIs):
+\end_layout
+
+\begin_layout Itemize
+The system has to include several graphical user interfaces: intuitive,
+ complete and exceptionally easy to use.
+ An interface to contain areas of input, dialog boxes, buttons, links and
+ drop-down menus will be developed.
+ The interfaces will interact with business logic and then be differentiated
+ according to user roles in the system: each interface will provide access
+ to features that compete for the particular user who is logged in.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Scenarios
+\end_layout
+
+\begin_layout Standard
+This section will present some possible situations that may occur from the
+ interaction between a user and the system developed.
+\end_layout
+
+\begin_layout Standard
+\begin_inset space \quad{}
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Alice is curious about PowerEnjoy
+\end_layout
+
+\begin_layout Standard
+Lily tells Alice about a new service called PowerEnjoy: Alice, now curious,
+ tries to register to PowerEnjoy.
+ She visits the homepage, browses the site a little and then proceeds to
+ the registration page.
+ Alice then enters all the data needed by the system to complete the process:
+ name and surname, username, email address, password, ID card number and
+ license number.
+ To complete the sign-up she finally enters the billing information.
+ Once everything is done, the system sends her a confirmation mail with
+ a link used to activate her new account.
+ She has now completed the registration, and she can log into the system
+ and power enjoy the service.
+\end_layout
+
+\begin_layout Standard
+\begin_inset space \quad{}
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Grandpa Peter and his expired license
+\end_layout
+
+\begin_layout Standard
+Grandpa Peter has been registered to PowerEnjoy for a quite long time.
+ He loves the car sharing model, now more than ever since his old Panda
+ broke a long time ago and he could not pick up his nephews, David and Goliath,
+ from the pool.
+ There is a problem, though: Peter is getting old, and his license has to
+ be renewed to drive again.
+ After a long day at the Driver and Vehicle Licensing Agency, Grandpa Peter
+ successfully got his shiny license back! To reactivate his PowerEnjoy account,
+ Peter has to edit his account data and insert the new license card number:
+ after having logged in, he proceeds to his personal area by clicking “Edit
+ Personal Data", he puts the new data in the system, and finally he saves
+ the changes.
+ Grandpa Peter is on the road, again!
+\end_layout
+
+\begin_layout Standard
+\begin_inset space \quad{}
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Grandpa Peter and his nephews
+\end_layout
+
+\begin_layout Standard
+It's rainy outside, so Grandpa Peter has to pick up his two nephews from
+ the pool: he picks up his smartphone and checks if there are any available
+ cars near him.
+ He is getting old so he cannot walk for a long time, so he reserves the
+ nearest car which, unfortunately, has less than 50% battery charge remaining.
+ Once in the car's reach, Peter taps on “Open Vehicle” and inputs his verificati
+on code.
+ His memory is aging just like him so the usual “1969” code, which corresponds
+ to the year he married his beloved Franca, turned into “1967” which is
+ not accepted by the system.
+ The system prompts him again, and this time Peter does not fail: the doors
+ unlock, and Grandpa is on the road once more! Peter's driving skills are
+ still amazing: he picks up the kids and gets home in no time, so he ends
+ the rent.
+ Unfortunately, he is not able to use the 20% discount due to the battery
+ charge left, but he will be cut 10% since he took at least two other people
+ in the car.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage pagebreak
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Pablo and Tata go to the cinema
+\end_layout
+
+\begin_layout Standard
+Tata and Pablo make a great couple.
+ It's Friday night, and the theaters are flooded by the latest sci-fi movie
+ everyone love.
+ Pablo loves all those lightsabers and starships while Tata just can't get
+ the point out of them.
+ The film will start in more than one hour: Pablo is ready for the night
+ out, Tata has to fix her makeup.
+ “Five minutes and I am ready!" - she said.
+ Unfortunately, Pablo forgot to charge his phone so he can't use his phone's
+ GPS to save precious battery juice and reserves his PowerEnjoy car by entering
+ his address into the app.
+ Time goes by; one hour has passed, and Pablo is still waiting for Tata
+ who seems to have no intentions leaving the bathroom.
+ The film has just begun, the reservation expired, the car is available
+ to be reserved again, and Pablo has to pay 1€ fee: “One minute and we are
+ rolling!” - she said.
+ Pablo, may the force be with you!
+\end_layout
+
+\begin_layout Standard
+\begin_inset space \quad{}
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Gustavo, the discount hunter
+\end_layout
+
+\begin_layout Standard
+Gustavo is a saver, methodic and old-fashioned man, and he built an economic
+ empire from scratch.
+ He owns a vintage 1968 Ford Torino which is only used on Saturday afternoons
+ with his closest friend to honor the times long gone: on the other days,
+ he mainly uses PowerEnjoy.
+ Gustavo has turned on the money saving option while signing up, and he
+ loves it.
+ Once in the car, he logs in and proceed to set up his seat and insert his
+ destination: the system now calculates the overall cars distribution in
+ the city, verifies the availability of power plugs in the nearest power
+ grid stations to the arrival and suggests to park in a special area just
+ 300 meters away from his destination.
+ Once there, Gustavo, just before ending the rental, takes care of plugging
+ the car into the power grid: now, the smartphone application shows him
+ the total cost which includes the 40% discount.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Models
+\end_layout
+
+\begin_layout Standard
+In this section we are going to abstract from the previously seen scenarios
+ in order to have a more high-level description.
+ For this purpose we will use UML (Unified Modeling Language) diagrams.
+
+\end_layout
+
+\begin_layout Subsection
+Use cases model
+\end_layout
+
+\begin_layout Standard
+From previously denoted scenarios and from the whole analysis we did in
+ this document, we individuated the use cases of the system to be developed.
+ In these pictures there are some use Cases diagram which represent actors,
+ their use cases and their interactions.
+ Then some of them are better explained using a less formal and more narrative
+ way.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/Usecase_guest.png
+ width 60text%
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Guest Use Case
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/usecase_user.png
+ width 100text%
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+User Use Case
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/Usecase_disuser.png
+ width 100text%
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Deactivated User Use Case
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Registration
+\end_layout
+
+\begin_layout Standard
+\begin_inset Tabular
+
+
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Actors
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+Guest
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Preconditions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The guest has a working Internet connection and he has not registered an
+ account yet.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Events
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Enumerate
+The guest reaches the registration page
+\end_layout
+
+\begin_layout Enumerate
+The system requires the guest to enter all his/her personal information,
+ driving license data and login credentials along with the verification
+ code
+\end_layout
+
+\begin_layout Enumerate
+The guest types the requested information and presses the ’Next’ button
+\end_layout
+
+\begin_layout Enumerate
+The system verifies the uniqueness of the email, the equality of the twice
+ typed passwords and that the driving license is not expired yet
+\end_layout
+
+\begin_layout Enumerate
+The system notifies the guest that he is going to be redirected to an external
+ service web page where he will be required to enter his billing information
+\end_layout
+
+\begin_layout Enumerate
+The system receives a confirmation from the external payment service about
+ the correctness of the billing information
+\end_layout
+
+\begin_layout Enumerate
+The system shows to the guest a recap of the information already provided
+ and requires him to confirm them, to read and accept the EULA and complete
+ the registration
+\end_layout
+
+\begin_layout Enumerate
+The guest ticks the “I read carefully, and I accept the contract” box and
+ presses the “Confirm and Complete Registration” button
+\end_layout
+
+\begin_layout Enumerate
+The system sends an email to notify the correct registration to the guest
+\end_layout
+
+\begin_layout Enumerate
+The system reports the registration and redirects the user to the login
+ page
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Postconditions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The user has signed up.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Exceptions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The email the guest typed has been already used.
+ The second password does not match with the first one.
+ One of the fields is empty.
+ The SSN is not in compliance with the other guest's personal information.
+ The driving license is already expired.
+ The external payment service didn't confirm the billing information.
+ The guest did not accept the EULA.
+ In these cases the system notifies the error and cannot complete the registrati
+on.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Log in
+\end_layout
+
+\begin_layout Standard
+\paragraph_spacing onehalf
+\begin_inset Tabular
+
+
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Actors
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+User or Deactivated User
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Preconditions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The actor has a working Internet connection and he has already registered
+ his account.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Events
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Enumerate
+The actor reaches the log in page
+\end_layout
+
+\begin_layout Enumerate
+The system requires the actor to enter his email and password
+\end_layout
+
+\begin_layout Enumerate
+The actor types the requested information and press the ’Log in’ button
+\end_layout
+
+\begin_layout Enumerate
+The system verifies the correctness of the email and password
+\end_layout
+
+\begin_layout Enumerate
+The system redirects the actor to his personal page
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Postconditions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The actor is logged in.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Exceptions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The email or the password the actor typed are not correct.
+ One of the fields is empty.
+ In these cases the actor can’t complete the log in.
+ The system notifies the error and cannot complete the login.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Edit personal information
+\end_layout
+
+\begin_layout Standard
+\paragraph_spacing onehalf
+\begin_inset Tabular
+
+
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Actors
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+User or Deactivated User
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Preconditions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The actor has a working Internet connection and he is already logged into
+ the system.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Events
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Enumerate
+The actor reaches his personal area
+\end_layout
+
+\begin_layout Enumerate
+The actor clicks the
+\begin_inset Quotes eld
+\end_inset
+
+Edit personal information
+\begin_inset Quotes erd
+\end_inset
+
+ button
+\end_layout
+
+\begin_layout Enumerate
+The system allows the actor to change his address, mobile phone number,
+ password (and to confirm it), driving license number, the expiration date
+ and the authority who released it
+\end_layout
+
+\begin_layout Enumerate
+The user enters the new information and presses ’Save’
+\end_layout
+
+\begin_layout Enumerate
+The system verifies the correctness and the completeness of the information
+\end_layout
+
+\begin_layout Enumerate
+The system shows the actor his updated information
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Postconditions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The user has modified his personal information.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Exceptions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+One of the fields is empty.
+ The second password does not match with the first one.
+ The driving license is already expired.
+ In these cases the system notifies the error and cannot complete the request.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Edit billing information
+\end_layout
+
+\begin_layout Standard
+\paragraph_spacing onehalf
+\begin_inset Tabular
+
+
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Actors
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+User or Deactivated User
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Preconditions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The actor has a working Internet connection and he is already logged into
+ the system.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Events
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Enumerate
+The actor reaches his personal area
+\end_layout
+
+\begin_layout Enumerate
+The actor clicks the
+\begin_inset Quotes eld
+\end_inset
+
+Edit billing information
+\begin_inset Quotes erd
+\end_inset
+
+ button
+\end_layout
+
+\begin_layout Enumerate
+The system notifies the actor that he is going to be redirect to an external
+ service web page where he will be required to enter his new billing information
+\end_layout
+
+\begin_layout Enumerate
+The system receives a confirmation from the external payment service about
+ the correctness of the new billing information
+\end_layout
+
+\begin_layout Enumerate
+The system shows the actor his updated information
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Postconditions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The user has modified his billing information.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Exceptions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The external payment service did not confirm the billing information.
+ In this case the system notifies the error and cannot complete the request.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Check available cars' position and status
+\end_layout
+
+\begin_layout Standard
+\paragraph_spacing onehalf
+\begin_inset Tabular
+
+
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Actors
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+Guest, User or Deactivated User
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Preconditions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The actor has a working Internet connection.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Events
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Enumerate
+The actor opens the map
+\end_layout
+
+\begin_layout Enumerate
+The system requires the actor to enter an address or to use his position
+ to localize cars
+\end_layout
+
+\begin_layout Enumerate
+The actor types the address where he wants to find an available car or clicks
+
+\begin_inset Quotes eld
+\end_inset
+
+Use my position
+\begin_inset Quotes erd
+\end_inset
+
+ button
+\end_layout
+
+\begin_layout Enumerate
+The system verifies the correctness of the information and send a request
+ to the RMSS
+\end_layout
+
+\begin_layout Enumerate
+The system receives an answer from the RMSS with the available cars and
+ shows them to the actor on the map
+\end_layout
+
+\begin_layout Enumerate
+The actor taps the icon that stands for the available car he chooses
+\end_layout
+
+\begin_layout Enumerate
+The system shows to the actor the status of the selected available car
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Postconditions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The actor obtains all the information about the position and the status
+ of any available car in a certain area.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Exceptions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The address field is empty.
+ The inserted address is not found or the location service does not work.
+ There is no available cars in the selected area.
+ In these cases the system notifies the error and cannot complete the request.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Reserve a car
+\end_layout
+
+\begin_layout Standard
+\paragraph_spacing onehalf
+\begin_inset Tabular
+
+
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Actors
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+User
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Preconditions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The user has a working Internet connection, he has already checked the position
+ and the status of an available car and he is logged into the system for
+ the whole reservation.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Events
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Enumerate
+The user clicks on “Reserve car” button
+\end_layout
+
+\begin_layout Enumerate
+The system send to the RMSS the user position and his reservation request
+
+\end_layout
+
+\begin_layout Enumerate
+The system receives an affirmative answer from the RMSS
+\end_layout
+
+\begin_layout Enumerate
+The system creates a new instance of the reservation
+\end_layout
+
+\begin_layout Enumerate
+The system notifies the user the success of the reservation
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Postconditions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The user reserved successfully a car.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Exceptions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The communication with the RMSS failed.
+ The system says to the user that the service is temporarily not available.
+ The localization service does not work.
+ The system receives a negative answer from the RMSS.
+ In these cases the system notifies the error to the user and he cannot
+ complete the reservation.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Open the reserved car
+\end_layout
+
+\begin_layout Standard
+\paragraph_spacing onehalf
+\begin_inset Tabular
+
+
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Actors
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+User
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Preconditions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The user has a working Internet connection, has already reserved a car and
+ he is logged into the system.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Events
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Enumerate
+The user reaches the car he reserved.
+
+\end_layout
+
+\begin_layout Enumerate
+The system checks user position or requires him to enter the code on the
+ windshield
+\end_layout
+
+\begin_layout Enumerate
+If necessary, the user enters the code he can read on the windshield
+\end_layout
+
+\begin_layout Enumerate
+The system requires the user enter his verification code
+\end_layout
+
+\begin_layout Enumerate
+The user types his verification code
+\end_layout
+
+\begin_layout Enumerate
+The system verifies the correctness of the verification code and the status
+ of the reservation
+\end_layout
+
+\begin_layout Enumerate
+The system unlocks the car doors, terminates the reservation and creates
+ a rent instance on the RMSS
+\end_layout
+
+\begin_layout Enumerate
+The user opens the car doors
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Postconditions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The user can get in the car.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Exceptions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The user failed to unlock the car in less than one hour: the system notifies
+ the end of the reservation to the user, declares the reserved car as available
+ again and applies 1€ of fee to the user.
+ | The system is not able to check the user position.
+ The user fails to enter the windshield code.
+ The verification code is not correct.
+ In these cases the system doesn’t unlock the doors.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Use the reserved car and terminate the rent
+\end_layout
+
+\begin_layout Standard
+\paragraph_spacing onehalf
+\begin_inset Tabular
+
+
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Actors
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+User
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Preconditions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The user has a working Internet connection, has already opened his reserved
+ car and he is logged into the system.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Events
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Enumerate
+If the money saving option is actived, the user can enter his final address
+ on the touchscreen display in the car
+\end_layout
+
+\begin_layout Enumerate
+If the user did it, the system shows a special parking area near his destination
+\end_layout
+
+\begin_layout Enumerate
+The user starts the engine and uses the car
+\end_layout
+
+\begin_layout Enumerate
+As a matter of choice, the user takes care of plugging the car into the
+ power grid
+\end_layout
+
+\begin_layout Enumerate
+The user clicks
+\begin_inset Quotes eld
+\end_inset
+
+Terminate rent
+\begin_inset Quotes erd
+\end_inset
+
+
+\end_layout
+
+\begin_layout Enumerate
+The system verifies nobody is in the car and that it is in a safe parking
+ area
+\end_layout
+
+\begin_layout Enumerate
+The system locks the car doors again, verifies the car's status and updates
+ the rent instance
+\end_layout
+
+\begin_layout Enumerate
+If necessary, the system contacts the MES for an ordinary (or extraordinary)
+ car maintenance.
+\end_layout
+
+\begin_layout Enumerate
+The system calculates the total cost and notifies the end of the rental
+ to the user along with the total cost
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Postconditions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The user successfully rented a car.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Exceptions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The address is not correct or it is not found.
+ The system notifies the error to the user and requires him to insert it
+ again.
+ | The car is not in a safe parking area.
+ The car is not empty.
+ In these cases the system doesn’t allow to terminate the rent.
+ | The user can't pay the total cost: the system deactivate the user.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Contact customer service
+\end_layout
+
+\begin_layout Standard
+\paragraph_spacing onehalf
+\begin_inset Tabular
+
+
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Actors
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Guest, User or Deactivated User
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Preconditions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The actor has a working Internet connection.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Events
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Enumerate
+The actor reaches the “Contact the Customer Service” page
+\end_layout
+
+\begin_layout Enumerate
+The system requires the actor to enter his own name, surname, mobile phone
+ number, email address and to explain his problem in less than 1000 words
+\end_layout
+
+\begin_layout Enumerate
+The user types the requested information and press the ‘Contact the Customer
+ Service” button
+\end_layout
+
+\begin_layout Enumerate
+The system redirects the request of the user to the customer service.
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Postconditions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The actor successfully contacted the customer service.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Exceptions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The actor uses more than 1000 words to explain his request.
+ There is at least one empty field.
+ In these cases the system notifies the error and cannot complete the request.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Sequence Diagram
+\end_layout
+
+\begin_layout Standard
+This section presents the sequence diagram of the most important interaction,
+ in order to have a dynamic sight of the main entities too.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/seqdia_reg.png
+ width 100text%
+ height 100theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Registration Sequence Diagram
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/seqdia_login.png
+ width 70text%
+ height 70theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Login Sequence Diagram
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/seqdia_checkavailability.png
+ width 100text%
+ height 90theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Check Cars' Availability Sequence Diagram
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/seqdia_editinfo.png
+ width 100text%
+ height 70theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Modify Personal Information Sequence Diagram
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/seqdia_editbilling.png
+ width 100text%
+ height 100theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Modify Billing Information Sequence Diagram
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/seqdia_reservation.png
+ width 100text%
+ height 100theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+ Car Reservation Sequence Diagram
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/seqdia_opencar.png
+ width 100text%
+ height 100theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Car Unlock Sequence Diagram
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/seqdia_rent.png
+ width 100text%
+ height 100theight%
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Car Rental Sequence Diagram
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/seqdia_contact.png
+ width 100text%
+ height 100theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Contact Customer Service Sequence Diagram
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Class Diagram
+\end_layout
+
+\begin_layout Standard
+Here it is shown a class diagram in order to give a static sight of the
+ main involved entities and of their relations.
+ The diagram, whose aim is just to better specificy requirements, is shown
+ in this picture.
+\end_layout
+
+\begin_layout Standard
+\begin_inset space \quad{}
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/ClassD.png
+ width 100text%
+ height 100theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Class Diagram
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Alloy
+\end_layout
+
+\begin_layout Standard
+In this section we tried to verify the consistency of our class diagram.
+ To this goal, we realized a formal model of the system based both on the
+ class diagram and in the previously done assumptions and considerations
+ about constraints.
+ We realized this model using Alloy syntax, thanks to which we get on formally
+ describing the domain of our application and its properties.
+ Then we verified the consistency of our model using Alloy Analyzer.
+ Here there is the code of the model of the system.
+\end_layout
+
+\begin_layout Standard
+\begin_inset space \quad{}
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+lstdefinelanguage{alloy}
+\end_layout
+
+\begin_layout Plain Layout
+
+{keywords={%
+\end_layout
+
+\begin_layout Plain Layout
+
+ assert, pred, all, no, lone, one, some, check, run,
+\end_layout
+
+\begin_layout Plain Layout
+
+ but, let, implies, not, iff, in, and, or, set, sig, Int, int,
+\end_layout
+
+\begin_layout Plain Layout
+
+if, then, else, exactly, disj, fact, fun, module, abstract,
+\end_layout
+
+\begin_layout Plain Layout
+
+ extends, open, none, univ, iden, seq,
+\end_layout
+
+\begin_layout Plain Layout
+
+ },
+\end_layout
+
+\begin_layout Plain Layout
+
+ literate=%
+\end_layout
+
+\begin_layout Plain Layout
+
+ {:}{$
+\backslash
+colon
+\backslash
+ $}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ %{|}{$
+\backslash
+bullet$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {==}{$=$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {=}{$=
+\backslash
+ $}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {!=}{$
+\backslash
+neq
+\backslash
+ $}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {&&}{$
+\backslash
+land$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {||}{$
+\backslash
+lor
+\backslash
+ $}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {<=}{$
+\backslash
+le
+\backslash
+ $}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {>=}{$
+\backslash
+ge
+\backslash
+ $}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ %{all}{$
+\backslash
+forall
+\backslash
+ $}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {exists}{$
+\backslash
+exists
+\backslash
+ $}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {!in}{$
+\backslash
+not
+\backslash
+in
+\backslash
+ $}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {
+\backslash
+
+\backslash
+in}{$
+\backslash
+in$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {=>}{$
+\backslash
+implies
+\backslash
+ $}2
+\end_layout
+
+\begin_layout Plain Layout
+
+ % the following isn't actually Alloy, but it gives the option to produce
+ nicer latex
+\end_layout
+
+\begin_layout Plain Layout
+
+ {|=>}{$
+\backslash
+Rightarrow$}2
+\end_layout
+
+\begin_layout Plain Layout
+
+ {<=set}{$
+\backslash
+subseteq$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {+set}{$
+\backslash
+cup$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {*set}{$
+\backslash
+cap$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {==>}{$
+\backslash
+Longrightarrow$}3
+\end_layout
+
+\begin_layout Plain Layout
+
+ {<==>}{$
+\backslash
+Longleftrightarrow$}4
+\end_layout
+
+\begin_layout Plain Layout
+
+ {...}{$
+\backslash
+ldots$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {
+\backslash
+
+\backslash
+hl}{$
+\backslash
+hline$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {
+\backslash
+
+\backslash
+alpha}{$
+\backslash
+alpha$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {
+\backslash
+
+\backslash
+beta}{$
+\backslash
+beta$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {
+\backslash
+
+\backslash
+gamma}{$
+\backslash
+gamma$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {
+\backslash
+
+\backslash
+delta}{$
+\backslash
+delta$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {
+\backslash
+
+\backslash
+epsilon}{$
+\backslash
+epsilon$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {
+\backslash
+
+\backslash
+zeta}{$
+\backslash
+zeta$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {
+\backslash
+
+\backslash
+eta}{$
+\backslash
+eta$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {
+\backslash
+
+\backslash
+theta}{$
+\backslash
+theta$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {
+\backslash
+
+\backslash
+iota}{$
+\backslash
+iota$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {
+\backslash
+
+\backslash
+kappa}{$
+\backslash
+kappa$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {
+\backslash
+
+\backslash
+lambda}{$
+\backslash
+lambda$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {
+\backslash
+
+\backslash
+mu}{$
+\backslash
+mu$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {
+\backslash
+
+\backslash
+nu}{$
+\backslash
+nu$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {
+\backslash
+
+\backslash
+xi}{$
+\backslash
+xi$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {
+\backslash
+
+\backslash
+pi}{$
+\backslash
+pi$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {
+\backslash
+
+\backslash
+rho}{$
+\backslash
+rho$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {
+\backslash
+
+\backslash
+sigma}{$
+\backslash
+sigma$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {
+\backslash
+
+\backslash
+tau}{$
+\backslash
+tau$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {
+\backslash
+
+\backslash
+upsilon}{$
+\backslash
+upsilon$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {
+\backslash
+
+\backslash
+phi}{$
+\backslash
+phi$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {
+\backslash
+
+\backslash
+chi}{$
+\backslash
+chi$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {
+\backslash
+
+\backslash
+psi}{$
+\backslash
+psi$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {
+\backslash
+
+\backslash
+omega}{$
+\backslash
+omega$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {
+\backslash
+
+\backslash
+Gamma}{$
+\backslash
+Gamma$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {
+\backslash
+
+\backslash
+Delta}{$
+\backslash
+Delta$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {
+\backslash
+
+\backslash
+Theta}{$
+\backslash
+Theta$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {
+\backslash
+
+\backslash
+Lambda}{$
+\backslash
+Lambda$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {
+\backslash
+
+\backslash
+Xi}{$
+\backslash
+Xi$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {
+\backslash
+
+\backslash
+Pi}{$
+\backslash
+Pi$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {
+\backslash
+
+\backslash
+Sigma}{$
+\backslash
+Sigma$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {
+\backslash
+
+\backslash
+Upsilon}{$
+\backslash
+Upsilon$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {
+\backslash
+
+\backslash
+Phi}{$
+\backslash
+Phi$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {
+\backslash
+
+\backslash
+Psi}{$
+\backslash
+Psi$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {
+\backslash
+
+\backslash
+Omega}{$
+\backslash
+Omega$}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ {
+\backslash
+
+\backslash
+EOF}{
+\backslash
+;}1
+\end_layout
+
+\begin_layout Plain Layout
+
+ ,
+\end_layout
+
+\begin_layout Plain Layout
+
+ sensitive=true, % case sensitive
+\end_layout
+
+\begin_layout Plain Layout
+
+ morecomment=[l]//,%
+\end_layout
+
+\begin_layout Plain Layout
+
+ morecomment=[l]{--},%
+\end_layout
+
+\begin_layout Plain Layout
+
+ morecomment=[s]{/*}{*/},%
+\end_layout
+
+\begin_layout Plain Layout
+
+ morestring=[b]",
+\end_layout
+
+\begin_layout Plain Layout
+
+ numbers=none,
+\end_layout
+
+\begin_layout Plain Layout
+
+ firstnumber=1,
+\end_layout
+
+\begin_layout Plain Layout
+
+ numberstyle=
+\backslash
+tiny,
+\end_layout
+
+\begin_layout Plain Layout
+
+ stepnumber=2,
+\end_layout
+
+\begin_layout Plain Layout
+
+ basicstyle=
+\backslash
+scriptsize
+\backslash
+ttfamily
+\backslash
+large,
+\end_layout
+
+\begin_layout Plain Layout
+
+ commentstyle=
+\backslash
+bfseries
+\backslash
+color{blue!20!black!50!green},
+\end_layout
+
+\begin_layout Plain Layout
+
+ keywordstyle=
+\backslash
+bfseries
+\backslash
+color{blue},
+\end_layout
+
+\begin_layout Plain Layout
+
+ numberstyle=
+\backslash
+bfseries
+\backslash
+color{red},
+\end_layout
+
+\begin_layout Plain Layout
+
+ ndkeywordstyle=
+\backslash
+bfseries
+\backslash
+color{red},
+\end_layout
+
+\begin_layout Plain Layout
+
+ tabsize=2,
+\end_layout
+
+\begin_layout Plain Layout
+
+ columns=fullflexible,
+\end_layout
+
+\begin_layout Plain Layout
+
+}
+\end_layout
+
+\begin_layout Plain Layout
+
+% inline
+\end_layout
+
+\begin_layout Plain Layout
+
+
+\backslash
+def
+\backslash
+A{%
+\end_layout
+
+\begin_layout Plain Layout
+
+
+\backslash
+lstinline[language=alloy,basicstyle=
+\backslash
+ttfamily,columns=fixed]}
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+% paragraph
+\end_layout
+
+\begin_layout Plain Layout
+
+
+\backslash
+lstnewenvironment{alloy}[1][]{%
+\end_layout
+
+\begin_layout Plain Layout
+
+
+\backslash
+lstset{language=alloy,
+\end_layout
+
+\begin_layout Plain Layout
+
+ floatplacement={tbp},captionpos=b,
+\end_layout
+
+\begin_layout Plain Layout
+
+ xleftmargin=8pt,xrightmargin=8pt,basicstyle=
+\backslash
+ttfamily,#1}}{}
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+% paragraph from file
+\end_layout
+
+\begin_layout Plain Layout
+
+
+\backslash
+newcommand{
+\backslash
+alloyfile}[1]{
+\end_layout
+
+\begin_layout Plain Layout
+
+
+\backslash
+lstinputlisting[language=alloy,%
+\end_layout
+
+\begin_layout Plain Layout
+
+ frame=lines,xleftmargin=8pt,xrightmargin=8pt,basicstyle=
+\backslash
+ttfamily,columns=fixed]{#1}
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+}
+\end_layout
+
+\begin_layout Plain Layout
+
+
+\backslash
+lstinputlisting[language=alloy]{res/alloy/AlloyPowerEnjoy.als}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Generated Worlds
+\end_layout
+
+\begin_layout Standard
+Here are presented three generated worlds, according to the model specified
+ in Alloy.
+\end_layout
+
+\begin_layout Standard
+\begin_inset External
+ template PDFPages
+ filename res/img/alloy_mondo_1.pdf
+ rotateAngle 90
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset External
+ template PDFPages
+ filename res/img/alloy_mondo_3.pdf
+ rotateAngle 90
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset External
+ template PDFPages
+ filename res/img/alloy_mondo_2.pdf
+ rotateAngle 90
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Appendix
+\end_layout
+
+\begin_layout Subsection
+Tools used
+\end_layout
+
+\begin_layout Standard
+We used the following tools to produce this document:
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+LaTex
+\series default
+ as typesetting system to write this document
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+LyX
+\series default
+ as editor
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+Visio Professional
+\series default
+ to draw all the diagrams
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+Alloy Analyzer 4.2
+\series default
+ to write and verify alloy models
+\end_layout
+
+\begin_layout Subsection
+Hours spent
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/hours.png
+ width 50text%
+ height 50theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Newpage pagebreak
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document
diff --git a/1.RASD/RASD.lyx~~ b/1.RASD/RASD.lyx~~
new file mode 100644
index 0000000..d7b06b6
--- /dev/null
+++ b/1.RASD/RASD.lyx~~
@@ -0,0 +1,4184 @@
+#LyX 2.2 created this file. For more info see http://www.lyx.org/
+\lyxformat 508
+\begin_document
+\begin_header
+\save_transient_properties true
+\origin unavailable
+\textclass article
+\use_default_options true
+\maintain_unincluded_children false
+\language english
+\language_package default
+\inputencoding auto
+\fontencoding global
+\font_roman "default" "default"
+\font_sans "default" "default"
+\font_typewriter "default" "default"
+\font_math "auto" "auto"
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_osf false
+\font_sf_scale 100 100
+\font_tt_scale 100 100
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\float_placement H
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\papersize default
+\use_geometry true
+\use_package amsmath 1
+\use_package amssymb 1
+\use_package cancel 1
+\use_package esint 1
+\use_package mathdots 1
+\use_package mathtools 1
+\use_package mhchem 1
+\use_package stackrel 1
+\use_package stmaryrd 1
+\use_package undertilde 1
+\cite_engine basic
+\cite_engine_type default
+\biblio_style plain
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\justification true
+\use_refstyle 1
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\leftmargin 2.5cm
+\rightmargin 2.5cm
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\quotes_language english
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\end_header
+
+\begin_body
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{titlepage}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+
+\backslash
+newcommand{
+\backslash
+HRule}{
+\backslash
+rule{
+\backslash
+linewidth}{0.5mm}}
+\end_layout
+
+\begin_layout Plain Layout
+
+
+\backslash
+center
+\end_layout
+
+\begin_layout Plain Layout
+
+
+\backslash
+textsc{
+\backslash
+LARGE Politecnico di Milano}
+\backslash
+
+\backslash
+[1.5cm]
+\backslash
+textsc{
+\backslash
+Large PowerEnjoy}
+\backslash
+
+\backslash
+[0.5cm]
+\end_layout
+
+\begin_layout Plain Layout
+
+
+\backslash
+textsc{
+\backslash
+Large Software Engineering 2}
+\backslash
+
+\backslash
+[0.5cm]
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+
+\backslash
+HRule
+\backslash
+
+\backslash
+[0.4cm] {
+\backslash
+huge
+\backslash
+bfseries Requirements Analysis and Specification Document}
+\backslash
+
+\backslash
+[0.4cm]
+\backslash
+HRule
+\backslash
+
+\backslash
+[1.5cm]
+\end_layout
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{minipage}{0.4
+\backslash
+textwidth}
+\backslash
+begin{flushleft}
+\backslash
+large
+\backslash
+emph{Authors:}
+\backslash
+
+\backslash
+ Giancarlo
+\backslash
+textsc{Colaci}
+\backslash
+newline Giulio
+\backslash
+textsc{De Pasquale}
+\backslash
+newline Francesco
+\backslash
+textsc{Rinaldi}
+\backslash
+end{flushleft}
+\backslash
+end{minipage} ~
+\backslash
+begin{minipage}{0.4
+\backslash
+textwidth}
+\backslash
+begin{flushright}
+\backslash
+large
+\backslash
+emph{Supervisor:}
+\backslash
+
+\backslash
+ Elisabetta
+\backslash
+textsc{De Nitto}
+\backslash
+end{flushright}
+\backslash
+end{minipage}
+\backslash
+
+\backslash
+[3cm]
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Graphics
+ filename res/img/logopm.pdf
+ width 30text%
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vfill
+\end_layout
+
+\begin_layout Plain Layout
+
+{
+\backslash
+large
+\backslash
+today}
+\backslash
+
+\backslash
+[3cm]
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{titlepage}
+\end_layout
+
+\end_inset
+
+
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+mbox{}
+\backslash
+thispagestyle{empty}
+\backslash
+newpage
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset toc
+LatexCommand tableofcontents
+
+\end_inset
+
+
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+thispagestyle{empty}
+\end_layout
+
+\end_inset
+
+
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+mbox{}
+\backslash
+thispagestyle{empty}
+\backslash
+newpage
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+setcounter{page}{1}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Introduction
+\end_layout
+
+\begin_layout Subsection
+Description of the given problem
+\end_layout
+
+\begin_layout Standard
+We will project and implement PowerEnjoy, which is a new car-sharing service
+ that exclusively employs electric cars.
+ The system that will be developed has to allow the registration of a new
+ user with all his personal information (like name, age, driving license
+ and credit card information), log in credentials and the possibility to
+ find the locations of available cars within a certain distance from his
+ current location or from a specified address.
+ Moreover, according to some policies (specified later) the user can obtain
+ exclusive discounts and offers.
+\end_layout
+
+\begin_layout Subsection
+Purpose
+\end_layout
+
+\begin_layout Standard
+Padulo Francesco
+\end_layout
+
+\begin_layout Subsection
+Scope
+\end_layout
+
+\begin_layout Standard
+Vedi sopra
+\end_layout
+
+\begin_layout Subsection
+Goals
+\end_layout
+
+\begin_layout Standard
+PowerEnJoy's users will be able to:
+\end_layout
+
+\begin_layout Itemize
+register themselves to the system;
+\end_layout
+
+\begin_layout Itemize
+log into the system;
+\end_layout
+
+\begin_layout Itemize
+find the location of available cars in a specified area;
+\end_layout
+
+\begin_layout Itemize
+book a car with the possibility to cancel the reservation;
+\end_layout
+
+\begin_layout Itemize
+open his / her reserved car;
+\end_layout
+
+\begin_layout Itemize
+be notified of active reservation status;
+\end_layout
+
+\begin_layout Itemize
+end the rental;
+\end_layout
+
+\begin_layout Itemize
+know the total cost at the end of the lease;
+\end_layout
+
+\begin_layout Subsection
+Stakeholders
+\end_layout
+
+\begin_layout Standard
+Our primary stakeholder is the professor who gave us this didactical project.
+ Our stakeholder's main need is to review the complete project at the end
+ of the semester.
+ Our objective is to show him/her we have followed the development process
+ in all its parts and that we are able to carry out a challenging task from
+ the beginning to the end fully comprehending all its internal phases.
+ We want to show that we can identify key requirements and specifications,
+ design and test our web/mobile application while providing all documentation
+ backing up the source code.
+ Finally, our typical users will be people that don’t have a car or that
+ prefer to rent a car instead of a public service transportation to go around
+ the city.
+\end_layout
+
+\begin_layout Subsection
+Glossary
+\end_layout
+
+\begin_layout Standard
+Below there are definitions of some terms that will be used in the document,
+ in order to avoid any ambiguity in their use and their understanding.
+\end_layout
+
+\begin_layout Description
+Guest: a person that has never signed up to the system.
+ He can only sign up and view available cars
+\end_layout
+
+\begin_layout Description
+User: a person already registered in the system who can log in and has a
+ personal profile and can use all the functionalities described.
+ Unless specified, each user is active: therefore can use the service with
+ no restrictions
+\end_layout
+
+\begin_layout Description
+Deactivated
+\begin_inset space ~
+\end_inset
+
+user: a user with revoked privileges.
+ He/she cannot use the service until the issues with his/her account are
+ solved (e.g., expired license)
+\end_layout
+
+\begin_layout Description
+Login: the action of accessing the system via a username and related password
+\end_layout
+
+\begin_layout Description
+Notification: a real-time alert that warns a user when there are updates
+ about what he is dealing with
+\end_layout
+
+\begin_layout Description
+Reservation: the action performed by the registered user when he chooses
+ to drive an available car.
+ It expires as soon as one of these conditions is met: one hour is elapsed
+ from the user's reservation request or the car is unlocked
+\end_layout
+
+\begin_layout Description
+Rent: the temporary possession and use of one of the PowerEnjoy's cars in
+ return for payment by a user.
+ It starts once a minute is elapsed from the car doors unlock or the engine
+ is ignited and lasts until the doors are re-locked by the system
+\end_layout
+
+\begin_layout Description
+Available: a fully functional car ready to be used by a registered user
+\end_layout
+
+\begin_layout Description
+Unavailable: a car which is currently reserved or used by a registered user
+ or is not entirely working (e.g.
+ exhausted battery, mechanical damage)
+\end_layout
+
+\begin_layout Description
+Reservable: an available car located in a geographical region where a registered
+ user is enabled to reserve it
+\end_layout
+
+\begin_layout Description
+Parking
+\begin_inset space ~
+\end_inset
+
+area: circumscribed public area where cars can be parked (e.g.
+ no parking lots)
+\end_layout
+
+\begin_layout Description
+Recharging
+\begin_inset space ~
+\end_inset
+
+area: it is included in the parking area; cars parked here can also be recharged
+ thanks to several charging stations
+\end_layout
+
+\begin_layout Description
+Special
+\begin_inset space ~
+\end_inset
+
+area: specific recharging areas decided by the system to ensure a uniform
+ distribution of cars in the city
+\end_layout
+
+\begin_layout Description
+RMSS: Reservation Management Sub-System, it is an already developed part
+ of our system which stores and manages all the information about the PowerEnjoy
+'s cars and about their reservation.
+\end_layout
+
+\begin_layout Description
+MES: Maintenance External Service, it is an external service that takes
+ care of ordinary or extraordinary car maintenance.
+\end_layout
+
+\begin_layout Description
+ADS: Auto Diagnosis System, an always on embedded peripheral which continuously
+ monitors the status of the car (e.g.
+ battery charge, tires pressure, impact detection)
+\end_layout
+
+\begin_layout Description
+ECS: Emergency Call System, an always on embedded peripheral which can be
+ used to call the consumer service or an emergency number quickly
+\end_layout
+
+\begin_layout Description
+Verification
+\begin_inset space ~
+\end_inset
+
+code: it is a four digits code chosen by the user during the registration
+ procedure that adds another level of security to our service; the user
+ will need it to unlock the car
+\end_layout
+
+\begin_layout Description
+Countdown: it is the time given to the user to pick-up the reserved car
+ before the reservation expires (during this period the reservation is active)
+\end_layout
+
+\begin_layout Description
+EULA: End User License Agreement
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Overall Description
+\end_layout
+
+\begin_layout Subsection
+Proposed System
+\end_layout
+
+\begin_layout Standard
+The server-side implementation will be structured through a net of micro-service
+s mainly written in Python and managed through Docker.
+ The server will run the business logic, host PowerEnjoy's website, and
+ users' data.
+ Besides, we propose a web/mobile application which allows to registered
+ users to use PowerEnjoy's services.
+ The web client will use Python/Javascript and HTML5/CSS for web pages generatio
+n and formatting respectively.
+ We will also use open-source libraries such as Flask to speed up the developmen
+t.
+ The mobile applications will be deployed on the main platforms currently
+ available (iOS, Android, Windows Phone) and will be written accordingly
+ to each devices' programming language.
+ Client-server communication will be platform agnostic since it will happen
+ through an encrypted RESTful API which returns its data through JSON.
+\end_layout
+
+\begin_layout Subsection
+Domain Properties
+\end_layout
+
+\begin_layout Standard
+We suppose these conditions will be respected at any given time:
+\end_layout
+
+\begin_layout Itemize
+the user will request help only if he/she needs it;
+\end_layout
+
+\begin_layout Itemize
+the user will never try to exploit the system's features (e.g.
+ sleep in the car);
+\end_layout
+
+\begin_layout Itemize
+the user will never fake his/her position to cause a denial of service;
+
+\end_layout
+
+\begin_layout Itemize
+the user will only provide correct and authentic information while signing
+ up - a booked car will always be driven by the user who reserved it;
+\end_layout
+
+\begin_layout Itemize
+the user will never be robbed of the access credentials and the verification
+ code;
+\end_layout
+
+\begin_layout Itemize
+the user agrees to be geolocalized;
+\end_layout
+
+\begin_layout Itemize
+each available car is fully functional;
+\end_layout
+
+\begin_layout Itemize
+each car has an embedded key to turn on the engine;
+\end_layout
+
+\begin_layout Itemize
+each car is equipped with a properly working ADS and an ECS;
+\end_layout
+
+\begin_layout Itemize
+each car is fitted with a properly working notification touchscreen display;
+\end_layout
+
+\begin_layout Itemize
+an available car will always be found in the supposed position;
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage pagebreak
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Assumptions
+\end_layout
+
+\begin_layout Standard
+This section explores some of the vague concepts or loosely explained ones:
+ further hypotheses have been added to expand the description of the requirement
+s and to account better for the interaction between the external environment
+ and the developed application.
+\end_layout
+
+\begin_layout Standard
+Due to some unclear points in the specification we made some assumptions,
+ which are:
+\end_layout
+
+\begin_layout Itemize
+the system allows users to locate any car in PowerEnjoy's area of operation;
+\end_layout
+
+\begin_layout Itemize
+the system's money saving option has to be enabled or disabled in the user
+ profile;
+\end_layout
+
+\begin_layout Itemize
+the system permits users to reserve an available car only in his/her city;
+\end_layout
+
+\begin_deeper
+\begin_layout Itemize
+"a certain geographical region" means that the user can reach the vehicle
+ in less than one hour from his position by foot or through public transportatio
+n: by these means, we set a maximum radius of 15 km;
+\end_layout
+
+\end_deeper
+\begin_layout Itemize
+the system can locate its users through Cellular Data or GPS;
+\end_layout
+
+\begin_layout Itemize
+the system's proximity check is done through one of these: numerical code
+ on each cars' windshield or GPS data from user's phone;
+\end_layout
+
+\begin_layout Itemize
+the fees are applied as soon as one of these conditions is met: one minute
+ is elapsed from the car's doors opening, or the engine is revved;
+\end_layout
+
+\begin_layout Itemize
+each seat is equipped with a sensor which is used to detect the number of
+ passengers into each car;
+\end_layout
+
+\begin_layout Itemize
+each user can't reserve more than one car at the same time;
+\end_layout
+
+\begin_layout Itemize
+to be eligible for the 10% discount, almost two passengers have to remain
+ seated at the same time for at least one minute;
+\end_layout
+
+\begin_layout Itemize
+if a car is parked in a special area, the discount equals to 40%;
+\end_layout
+
+\begin_layout Subsection
+Actors Identifying
+\end_layout
+
+\begin_layout Standard
+The system provides the interaction of two different types of actors who
+ can use different functionalities of the application system.
+ The types are set out below along with a brief description of their privileges.
+\end_layout
+
+\begin_layout Subsubsection
+Guest
+\end_layout
+
+\begin_layout Standard
+A person that is not registered (yet!) so can check for cars' position,
+ register or ask for help/advice.
+\end_layout
+
+\begin_layout Paragraph
+Privileges:
+\end_layout
+
+\begin_layout Itemize
+Register to the system by creating a new account;
+\end_layout
+
+\begin_layout Itemize
+Check available cars' position and status;
+\end_layout
+
+\begin_layout Itemize
+Contact the customer service;
+\end_layout
+
+\begin_layout Subsubsection
+User
+\end_layout
+
+\begin_layout Standard
+A person that is already registered to the system with his personal information;
+ a guest can become a user after the authentication to the system using
+ the login form.
+\end_layout
+
+\begin_layout Paragraph
+Privileges:
+\end_layout
+
+\begin_layout Itemize
+Log into the system;
+\end_layout
+
+\begin_layout Itemize
+Consult reservations' history;
+\end_layout
+
+\begin_layout Itemize
+Edit account information:
+\end_layout
+
+\begin_deeper
+\begin_layout Itemize
+personal and billing data;
+\end_layout
+
+\begin_layout Itemize
+enable/disable money saving option;
+\end_layout
+
+\end_deeper
+\begin_layout Itemize
+Check available cars' position and status;
+\end_layout
+
+\begin_layout Itemize
+Reserve a reservable car;
+\end_layout
+
+\begin_layout Itemize
+Rent the reserved car;
+\end_layout
+
+\begin_layout Itemize
+Check active reservation status:
+\end_layout
+
+\begin_deeper
+\begin_layout Itemize
+Remaining time until the reservation expires;
+\end_layout
+
+\begin_layout Itemize
+Reserved car's position and status;
+\end_layout
+
+\begin_layout Itemize
+Elapsed rental time;
+\end_layout
+
+\end_deeper
+\begin_layout Itemize
+Request help through the ECS;
+\end_layout
+
+\begin_layout Itemize
+Terminate the rent;
+\end_layout
+
+\begin_layout Itemize
+Contact the customer service;
+\end_layout
+
+\begin_layout Subsubsection
+Deactivated User
+\end_layout
+
+\begin_layout Standard
+A user with revoked privileges.
+ He/she cannot use the service until the issues with his/her account are
+ solved (e.g expired license).
+\end_layout
+
+\begin_layout Paragraph
+Privileges:
+\end_layout
+
+\begin_layout Itemize
+Log into the system;
+\end_layout
+
+\begin_layout Itemize
+Consult reservations' history;
+\end_layout
+
+\begin_layout Itemize
+Edit account information:
+\end_layout
+
+\begin_deeper
+\begin_layout Itemize
+personal and billing data;
+\end_layout
+
+\begin_layout Itemize
+enable/disable money saving option;
+\end_layout
+
+\end_deeper
+\begin_layout Itemize
+Check available cars' position and status;
+\end_layout
+
+\begin_layout Itemize
+Contact the customer service;
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Specific Requirements
+\end_layout
+
+\begin_layout Standard
+In this section will be analyzed in detail functional and non-functional
+ requirements that the system developed has to satisfy, when the domain
+ properties previously denoted hold and referring to the declared goals.
+\end_layout
+
+\begin_layout Subsection
+Functional requirements
+\end_layout
+
+\begin_layout Standard
+The functional requirements include the functionalities that the system
+ must necessarily have and describe the interactions between the system
+ developed and the external environment independently from the implementation.
+\end_layout
+
+\begin_layout Enumerate
+Registration of a guest to the system:
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+The system has to guarantee the registration to a new user by creating a
+ new account.
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+Login of a user into the system:
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+The system has to allow the login to an already registered user when he
+ types the correct username and the password in the login form.
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+Find the location of available cars in a specified area:
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+The system has to allow both guests and users to specify the address where
+ they want to locate an available car or to use their position;
+\end_layout
+
+\begin_layout Enumerate
+The system has to guarantee that a car is showed on the map if and only
+ if it is available (that means that every available car is showed and that
+ every showed car is available);
+\end_layout
+
+\begin_layout Enumerate
+The system has to guarantee that the car's position is regularly showed
+ up to date.
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+Book a car with the possibility to cancel the reservation:
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+The system has to guarantee that only a user (i.e.
+ not a guest) can reserve a car;
+\end_layout
+
+\begin_layout Enumerate
+The system must be able to check the position of the user;
+\end_layout
+
+\begin_layout Enumerate
+The system has to guarantee that any user can reserve only one car at a
+ time;
+\end_layout
+
+\begin_layout Enumerate
+The system has to ensure that the same car cannot be reserved at the same
+ time by different users;
+\end_layout
+
+\begin_layout Enumerate
+The system has to guarantee that any user can have at most an active reservation
+;
+\end_layout
+
+\begin_layout Enumerate
+The system has to guarantee that every reservable car is available;
+\end_layout
+
+\begin_layout Enumerate
+The system has to ensure that only a reservable car can be reserved;
+\end_layout
+
+\begin_layout Enumerate
+The system has to guarantee that when a user reserves a car, the latter
+ is no more available;
+\end_layout
+
+\begin_layout Enumerate
+The system has to ensure that only an active reservation can expire or be
+ canceled;
+\end_layout
+
+\begin_layout Enumerate
+The system has to make sure that when a reservation expires or is revoked,
+ the car becomes available again;
+\end_layout
+
+\begin_layout Enumerate
+When a reservation is activated, the system starts a countdown at the end
+ of which the reservation expires if the user did not pick-up the reserved
+ car;
+\begin_inset Newpage pagebreak
+\end_inset
+
+
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+Open his/her reserved car;
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+The system must be able to check the proximity of the user to the reserved
+ car;
+\end_layout
+
+\begin_layout Enumerate
+The system must be able to check if the money saving option is enabled for
+ the current reservation;
+\end_layout
+
+\begin_layout Enumerate
+The system has to allow the user to insert the verification code;
+\end_layout
+
+\begin_layout Enumerate
+The system has to unlock the reserved car only if the entered verification
+ code is correct;
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+Be notified of active reservation status:
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+The system must be able to retrieve the starting time of the rental;
+\end_layout
+
+\begin_layout Enumerate
+The system must be able to calculate and notify the elapsed time of the
+ rental periodically;
+\end_layout
+
+\begin_layout Enumerate
+The system must be able to communicate with every grid power station to
+ check their power plugs' availability;
+\end_layout
+
+\begin_layout Enumerate
+The system, to ensure a uniform distribution of parked cars, must be able
+ to notify the user the nearest selected station where to leave the car
+ to get a discount only if he/she inputs a destination and the money saving
+ option is active;
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+End the rental:
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+The system has to allow the user to communicate that he/she wants to terminate
+ the rental using the car's display;
+\end_layout
+
+\begin_layout Enumerate
+The system has to allow the user to end the rental only if he is in a safe
+ parking area;
+\end_layout
+
+\begin_layout Enumerate
+The system has to guarantee that when a reservation is ended, the car becomes
+ available again;
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+Know the total cost at the end of the rental:
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+The system has to communicate with the ADS to retrieve the car status and
+ rental information;
+\end_layout
+
+\begin_layout Enumerate
+The system must be able to apply the discounts, if any, handling the previously
+ retrieved information;
+\end_layout
+
+\begin_layout Enumerate
+The system must communicate to the user the final cost of the rental;
+\end_layout
+
+\end_deeper
+\begin_layout Subsection
+Non-functional requirements
+\end_layout
+
+\begin_layout Standard
+The non-functional requirements are those not related to the functionality,
+ but rather consider the quality of the system to be implemented (Quality
+ of Service, QoS), regardless of the application domain.
+
+\end_layout
+
+\begin_layout Standard
+Security:
+\end_layout
+
+\begin_layout Itemize
+Each user will only be able to access functionality that competes to his
+ category, and it is, therefore, necessary to provide an authentication
+ method: it will be used the symmetric username/password one.
+ Furthermore, each credential will not be stored in cleartext, and client/server
+ communications will be protected by asymmetric encryption.
+
+\end_layout
+
+\begin_layout Standard
+Portability:
+\end_layout
+
+\begin_layout Itemize
+The client must be compatible with all hardware and software platforms to
+ reach as many users as possible.
+ This requirement is satisfied by realizing the client as a web application,
+ in this way the only assumptions that must be met by users are the availability
+ of a web browser and a connection to the Internet.
+
+\end_layout
+
+\begin_layout Standard
+Stability and reliability:
+\end_layout
+
+\begin_layout Itemize
+The system must notify the user the result of each his/her transaction request
+ while maintaining an optimal level of reliability.
+ Therefore it will be able to face with the possible loss of connection
+ between clients and the central server by ensuring atomicity of all operations.
+\end_layout
+
+\begin_layout Standard
+Performance:
+\end_layout
+
+\begin_layout Itemize
+As for performance, the timing of getting and insertion the information
+ in the database must be acceptable to do not block the whole system.
+
+\end_layout
+
+\begin_layout Standard
+Concurrency management:
+\end_layout
+
+\begin_layout Itemize
+The system must ensure data consistency while dealing with multiple concurrent
+ accesses to the same resource in the database by multiple users authenticated
+ to the system.
+
+\end_layout
+
+\begin_layout Standard
+Graphical User Interfaces (GUIs):
+\end_layout
+
+\begin_layout Itemize
+The system has to include several graphical user interfaces: intuitive,
+ complete and exceptionally easy to use.
+ An interface to contain areas of input, dialog boxes, buttons, links and
+ drop-down menus will be developed.
+ The interfaces will interact with business logic and then be differentiated
+ according to user roles in the system: each interface will provide access
+ to features that compete for the particular user who is logged in.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Scenarios
+\end_layout
+
+\begin_layout Standard
+This section will present some possible situations that may occur from the
+ interaction between a user and the system developed.
+\end_layout
+
+\begin_layout Subsection
+Alice is curious about PowerEnjoy
+\end_layout
+
+\begin_layout Standard
+Lily tells Alice about a new service called PowerEnjoy: Alice, now curious,
+ tries to register to PowerEnjoy.
+ She visits the homepage, browses the site a little and then proceeds to
+ the registration page.
+ Alice then enters all the data needed by the system to complete the process:
+ name and surname, username, email address, password, ID card number and
+ license number.
+ To complete the sign-up she finally enters the billing information.
+ Once everything is done, the system sends her a confirmation mail with
+ a link used to activate her new account.
+ She has now completed the registration, and she can log into the system
+ and power enjoy the service.
+\end_layout
+
+\begin_layout Subsection
+Grandpa Peter and his expired license
+\end_layout
+
+\begin_layout Standard
+Grandpa Peter has been registered to PowerEnjoy for a quite long time.
+ He loves the car sharing model, now more than ever since his old Panda
+ broke a long time ago and he could not pick up his nephews, David and Goliath,
+ from the pool.
+ There is a problem, though: Peter is getting old, and his license has to
+ be renewed to drive again.
+ After a long day at the Driver and Vehicle Licensing Agency, Grandpa Peter
+ successfully got his shiny license back! To reactivate his PowerEnjoy account,
+ Peter has to edit his account data and insert the new license card number:
+ after having logged in, he proceeds to his personal area by clicking “Edit
+ Personal Data", he puts the new data in the system, and finally he saves
+ the changes.
+ Grandpa Peter is on the road, again!
+\end_layout
+
+\begin_layout Subsection
+Grandpa Peter and his nephews
+\end_layout
+
+\begin_layout Standard
+It's rainy outside, so Grandpa Peter has to pick up his two nephews from
+ the pool: he picks up his smartphone and checks if there are any available
+ cars near him.
+ He is getting old so he cannot walk for a long time, so he reserves the
+ nearest car which, unfortunately, has less than 50% battery charge remaining.
+ Once in the car's reach, Peter taps on “Open Vehicle” and inputs his verificati
+on code.
+ His memory is aging just like him so the usual “1969” code, which corresponds
+ to the year he married his beloved Franca, turned into “1967” which is
+ not accepted by the system.
+ The system prompts him again, and this time Peter does not fail: the doors
+ unlock, and Grandpa is on the road once more! Peter's driving skills are
+ still amazing: he picks up the kids and gets home in no time, so he ends
+ the rent.
+ Unfortunately, he is not able to use the 20% discount due to the battery
+ charge left, but he will be cut 10% since he took at least two other people
+ in the car.
+\end_layout
+
+\begin_layout Subsection
+Pablo and Tata go to the cinema
+\end_layout
+
+\begin_layout Standard
+Tata and Pablo make a great couple.
+ It's Friday night, and the theaters are flooded by the latest sci-fi movie
+ everyone love.
+ Pablo loves all those lightsabers and starships while Tata just can't get
+ the point out of them.
+ The film will start in more than one hour: Pablo is ready for the night
+ out, Tata has to fix her makeup.
+ “Five minutes and I am ready!" - she said.
+ Unfortunately, Pablo forgot to charge his phone so he can't use his phone's
+ GPS to save precious battery juice and reserves his PowerEnjoy car by entering
+ his address into the app.
+ Time goes by; one hour has passed, and Pablo is still waiting for Tata
+ who seems to have no intentions leaving the bathroom.
+ The film has just begun, the reservation expired, the car is available
+ to be reserved again, and Pablo has to pay 1€ fee: “One minute and we are
+ rolling!” - she said.
+ Pablo, may the force be with you!
+\end_layout
+
+\begin_layout Subsection
+Gustavo, the discount hunter
+\end_layout
+
+\begin_layout Standard
+Gustavo is a saver, methodic and old-fashioned man, and he built an economic
+ empire from scratch.
+ He owns a vintage 1968 Ford Torino which is only used on Saturday afternoons
+ with his closest friend to honor the times long gone: on the other days,
+ he mainly uses PowerEnjoy.
+ Gustavo has turned on the money saving option while signing up, and he
+ loves it.
+ Once in the car, he logs in and proceed to set up his seat and insert his
+ destination: the system now calculates the overall cars distribution in
+ the city, verifies the availability of power plugs in the nearest power
+ grid stations to the arrival and suggests to park in a special area just
+ 300 meters away from his destination.
+ Once there, Gustavo, just before ending the rental, takes care of plugging
+ the car into the power grid: now, the smartphone application shows him
+ the total cost which includes the 40% discount.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Models
+\end_layout
+
+\begin_layout Standard
+In this section we are going to abstract from the previously seen scenarios
+ in order to have a more high-level description.
+ For this purpose we will use UML (Unified Modeling Language) diagrams.
+
+\end_layout
+
+\begin_layout Subsection
+Use cases model
+\end_layout
+
+\begin_layout Standard
+From previously denoted scenarios and from the whole analysis we did in
+ this document, we individuated the use cases of the system to be developed.
+ In these pictures there are some use Cases diagram which represent actors,
+ their use cases and their interactions.
+ Then some of them are better explained using a less formal and more narrative
+ way.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/Usecase_guest.png
+ width 60text%
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Guest Use Case
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/usecase_user.png
+ width 100text%
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+User Use Case
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/Usecase_disuser.png
+ width 100text%
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Deactivated User Use Case
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Registration
+\end_layout
+
+\begin_layout Standard
+\begin_inset Tabular
+
+
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Actors
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+Guest
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Preconditions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The guest has a working Internet connection and he has not registered an
+ account yet.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Events
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Enumerate
+The guest reaches the registration page
+\end_layout
+
+\begin_layout Enumerate
+The system requires the guest to enter all his/her personal information,
+ driving license data and login credentials along with the verification
+ code
+\end_layout
+
+\begin_layout Enumerate
+The guest types the requested information and presses the ’Next’ button
+\end_layout
+
+\begin_layout Enumerate
+The system verifies the uniqueness of the email, the equality of the twice
+ typed passwords and that the driving license is not expired yet
+\end_layout
+
+\begin_layout Enumerate
+The system notifies the guest that he is going to be redirected to an external
+ service web page where he will be required to enter his billing information
+\end_layout
+
+\begin_layout Enumerate
+The system receives a confirmation from the external payment service about
+ the correctness of the billing information
+\end_layout
+
+\begin_layout Enumerate
+The system shows to the guest a recap of the information already provided
+ and requires him to confirm them, to read and accept the EULA and complete
+ the registration
+\end_layout
+
+\begin_layout Enumerate
+The guest ticks the “I read carefully, and I accept the contract” box and
+ presses the “Confirm and Complete Registration” button
+\end_layout
+
+\begin_layout Enumerate
+The system sends an email to notify the correct registration to the guest
+\end_layout
+
+\begin_layout Enumerate
+The system reports the registration and redirects the user to the login
+ page
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Postconditions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The user has signed up.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Exceptions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The email the guest typed has been already used.
+ The second password does not match with the first one.
+ One of the fields is empty.
+ The SSN is not in compliance with the other guest's personal information.
+ The driving license is already expired.
+ The external payment service didn't confirm the billing information.
+ The guest did not accept the EULA.
+ In these cases the system notifies the error and cannot complete the registrati
+on.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Log in
+\end_layout
+
+\begin_layout Standard
+\paragraph_spacing onehalf
+\begin_inset Tabular
+
+
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Actors
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+User or Deactivated User
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Preconditions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The actor has a working Internet connection and he has already registered
+ his account.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Events
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Enumerate
+The actor reaches the log in page
+\end_layout
+
+\begin_layout Enumerate
+The system requires the actor to enter his email and password
+\end_layout
+
+\begin_layout Enumerate
+The actor types the requested information and press the ’Log in’ button
+\end_layout
+
+\begin_layout Enumerate
+The system verifies the correctness of the email and password
+\end_layout
+
+\begin_layout Enumerate
+The system redirects the actor to his personal page
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Postconditions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The actor is logged in.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Exceptions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The email or the password the actor typed are not correct.
+ One of the fields is empty.
+ In these cases the actor can’t complete the log in.
+ The system notifies the error and cannot complete the login.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Edit personal information
+\end_layout
+
+\begin_layout Standard
+\paragraph_spacing onehalf
+\begin_inset Tabular
+
+
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Actors
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+User or Deactivated User
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Preconditions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The actor has a working Internet connection and he is already logged into
+ the system.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Events
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Enumerate
+The actor reaches his personal area
+\end_layout
+
+\begin_layout Enumerate
+The actor clicks the
+\begin_inset Quotes eld
+\end_inset
+
+Edit personal information
+\begin_inset Quotes erd
+\end_inset
+
+ button
+\end_layout
+
+\begin_layout Enumerate
+The system allows the actor to change his address, mobile phone number,
+ password (and to confirm it), driving license number, the expiration date
+ and the authority who released it
+\end_layout
+
+\begin_layout Enumerate
+The user enters the new information and presses ’Save’
+\end_layout
+
+\begin_layout Enumerate
+The system verifies the correctness and the completeness of the information
+\end_layout
+
+\begin_layout Enumerate
+The system shows the actor his updated information
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Postconditions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The user has modified his personal information.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Exceptions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+One of the fields is empty.
+ The second password does not match with the first one.
+ The driving license is already expired.
+ In these cases the system notifies the error and cannot complete the request.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Edit billing information
+\end_layout
+
+\begin_layout Standard
+\paragraph_spacing onehalf
+\begin_inset Tabular
+
+
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Actors
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+User or Deactivated User
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Preconditions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The actor has a working Internet connection and he is already logged into
+ the system.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Events
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Enumerate
+The actor reaches his personal area
+\end_layout
+
+\begin_layout Enumerate
+The actor clicks the
+\begin_inset Quotes eld
+\end_inset
+
+Edit billing information
+\begin_inset Quotes erd
+\end_inset
+
+ button
+\end_layout
+
+\begin_layout Enumerate
+The system notifies the actor that he is going to be redirect to an external
+ service web page where he will be required to enter his new billing information
+\end_layout
+
+\begin_layout Enumerate
+The system receives a confirmation from the external payment service about
+ the correctness of the new billing information
+\end_layout
+
+\begin_layout Enumerate
+The system shows the actor his updated information
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Postconditions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The user has modified his billing information.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Exceptions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The external payment service did not confirm the billing information.
+ In this case the system notifies the error and cannot complete the request.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Check available cars' position and status
+\end_layout
+
+\begin_layout Standard
+\paragraph_spacing onehalf
+\begin_inset Tabular
+
+
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Actors
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+Guest, User or Deactivated User
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Preconditions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The actor has a working Internet connection.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Events
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Enumerate
+The actor opens the map
+\end_layout
+
+\begin_layout Enumerate
+The system requires the actor to enter an address or to use his position
+ to localize cars
+\end_layout
+
+\begin_layout Enumerate
+The actor types the address where he wants to find an available car or clicks
+
+\begin_inset Quotes eld
+\end_inset
+
+Use my position
+\begin_inset Quotes erd
+\end_inset
+
+ button
+\end_layout
+
+\begin_layout Enumerate
+The system verifies the correctness of the information and send a request
+ to the RMSS
+\end_layout
+
+\begin_layout Enumerate
+The system receives an answer from the RMSS with the available cars and
+ shows them to the actor on the map
+\end_layout
+
+\begin_layout Enumerate
+The actor taps the icon that stands for the available car he chooses
+\end_layout
+
+\begin_layout Enumerate
+The system shows to the actor the status of the selected available car
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Postconditions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The actor obtains all the information about the position and the status
+ of any available car in a certain area.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Exceptions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The address field is empty.
+ The inserted address is not found or the location service does not work.
+ There is no available cars in the selected area.
+ In these cases the system notifies the error and cannot complete the request.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Reserve a car
+\end_layout
+
+\begin_layout Standard
+\paragraph_spacing onehalf
+\begin_inset Tabular
+
+
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Actors
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+User
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Preconditions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The user has a working Internet connection, he has already checked the position
+ and the status of an available car and he is logged into the system for
+ the whole reservation.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Events
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Enumerate
+The user clicks on “Reserve car” button
+\end_layout
+
+\begin_layout Enumerate
+The system send to the RMSS the user position and his reservation request
+
+\end_layout
+
+\begin_layout Enumerate
+The system receives an affirmative answer from the RMSS
+\end_layout
+
+\begin_layout Enumerate
+The system creates a new instance of the reservation on the RMSS
+\end_layout
+
+\begin_layout Enumerate
+The system notifies the user the success of the reservation
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Postconditions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The user reserved successfully a car.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Exceptions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The communication with the RMSS failed.
+ The system says to the user that the service is temporarily not available.
+ The localization service does not work.
+ The system receives a negative answer from the RMSS.
+ In these cases the system notifies the error to the user and he cannot
+ complete the reservation.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Open the reserved car
+\end_layout
+
+\begin_layout Standard
+\paragraph_spacing onehalf
+\begin_inset Tabular
+
+
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Actors
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+User
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Preconditions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The user has a working Internet connection, has already reserved a car and
+ he is logged into the system.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Events
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Enumerate
+The user reaches the car he reserved.
+
+\end_layout
+
+\begin_layout Enumerate
+The system checks user position or requires him to enter the code on the
+ windshield
+\end_layout
+
+\begin_layout Enumerate
+If necessary, the user enters the code he can read on the windshield
+\end_layout
+
+\begin_layout Enumerate
+The system requires the user enter his verification code
+\end_layout
+
+\begin_layout Enumerate
+The user types his verification code
+\end_layout
+
+\begin_layout Enumerate
+The system verifies the correctness of the verification code and the status
+ of the reservation
+\end_layout
+
+\begin_layout Enumerate
+The system unlocks the car doors and updates the reservation instance on
+ the RMSS
+\end_layout
+
+\begin_layout Enumerate
+The user opens the car doors
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Postconditions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The user can get in the car.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Exceptions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The user failed to unlock the car in less than one hour: the system notifies
+ the end of the reservation to the user, declares the reserved car as available
+ again and applies 1€ of fee to the user.
+ | The system is not able to check the user position.
+ The user fails to enter the windshield code.
+ The verification code is not correct.
+ In these cases the system doesn’t unlock the doors.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Use the reserved car and terminate the rent
+\end_layout
+
+\begin_layout Standard
+\paragraph_spacing onehalf
+\begin_inset Tabular
+
+
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Actors
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+User
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Preconditions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The user has a working Internet connection, has already opened his reserved
+ car and he is logged into the system.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Events
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Enumerate
+As a matter of choice, the user enters his final address
+\end_layout
+
+\begin_layout Enumerate
+If the user did it, the system shows on the screen the best path to go there
+ and also a special parking area near his destination, if the money saving
+ option is actived
+\end_layout
+
+\begin_layout Enumerate
+The user starts the engine and uses the car
+\end_layout
+
+\begin_layout Enumerate
+As a matter of choice, the user takes care of plugging the car into the
+ power grid
+\end_layout
+
+\begin_layout Enumerate
+The user clicks
+\begin_inset Quotes eld
+\end_inset
+
+Terminate rent
+\begin_inset Quotes erd
+\end_inset
+
+
+\end_layout
+
+\begin_layout Enumerate
+The system verifies nobody is in the car and that it is in a safe parking
+ area
+\end_layout
+
+\begin_layout Enumerate
+The system locks the car doors again, verifies the car's status and updates
+ the reservation instance on the RMSS
+\end_layout
+
+\begin_layout Enumerate
+If necessary, the system contacts the MES for an ordinary (or extraordinary)
+ car maintenance.
+\end_layout
+
+\begin_layout Enumerate
+The system calculates the total cost and notifies the end of the rental
+ to the user along with the total cost
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Postconditions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The user successfully rented a car.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Exceptions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The address is not correct or it is not found.
+ The system notifies the error to the user and requires him to insert it
+ again.
+ | The car is not in a safe parking area.
+ The car is not empty.
+ In these cases the system doesn’t allow to terminate the rent.
+ | The user can't pay the total cost: the system deactivate the user.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Contact customer service
+\end_layout
+
+\begin_layout Standard
+\paragraph_spacing onehalf
+\begin_inset Tabular
+
+
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Actors
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Guest, User or Deactivated User
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Preconditions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The actor has a working Internet connection.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Events
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Enumerate
+The actor reaches the “Contact the Customer Service” page
+\end_layout
+
+\begin_layout Enumerate
+The system requires the actor to enter his own name, surname, mobile phone
+ number, email address and to explain his problem in less than 1000 words
+\end_layout
+
+\begin_layout Enumerate
+The user types the requested information and press the ‘Contact the Customer
+ Service” button
+\end_layout
+
+\begin_layout Enumerate
+The system redirects the request of the user to the customer service.
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Postconditions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The actor successfully contacted the customer service.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Exceptions
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+The actor uses more than 1000 words to explain his request.
+ There is at least one empty field.
+ In these cases the system notifies the error and cannot complete the request.
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vspace{0.15cm}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Sequence Diagram
+\end_layout
+
+\begin_layout Standard
+This section presents the sequence diagram of the most important interaction,
+ in order to have a dynamic sight of the main entities too.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/seqdia_reg.png
+ width 100text%
+ height 100theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Registration Sequence Diagram
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/seqdia_login.png
+ width 70text%
+ height 70theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Login Sequence Diagram
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/seqdia_checkavailability.png
+ width 100text%
+ height 90theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Check Cars' Availability Sequence Diagram
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/seqdia_editinfo.png
+ width 100text%
+ height 70theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Modify Personal Information Sequence Diagram
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/seqdia_editbilling.png
+ width 100text%
+ height 100theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Modify Billing Information Sequence Diagram
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/seqdia_reservation.png
+ width 100text%
+ height 100theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+ Car Reservation Sequence Diagram
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/seqdia_login.png
+ width 70text%
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Unlock Car Sequence Diagram
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/seqdia_login.png
+ width 70text%
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Rent Sequence Diagram
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/seqdia_contact.png
+ width 100text%
+ height 100theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Contact Customer Service Sequence Diagram
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Class Diagram
+\end_layout
+
+\begin_layout Standard
+Here it is shown a class diagram in order to give a static sight of the
+ main envolved entities and of their relations.
+ The diagram, whose aim is just to better specificy requirements,is shown
+ in this picture.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/ClassD.png
+ width 100text%
+ height 100theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Class Diagram
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Alloy
+\end_layout
+
+\begin_layout Standard
+In this section we tried to verify the consistency of our class diagram.
+ To this goal, we realized a formal model of the system based both on the
+ class diagram and in the previously done assumptions and considerations
+ about constraints.
+ We realized this model using Alloy sintax, thanks to which we get on formally
+ describing the domain of our application and its properties.
+ Then we verified the consistency of our model using Alloy Analizer.
+ Here there is the code of the model of the system.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Used Tools
+\end_layout
+
+\end_body
+\end_document
diff --git a/1.RASD/res/RASD CLASS DIAGRAM.vsdx b/1.RASD/res/RASD CLASS DIAGRAM.vsdx
new file mode 100644
index 0000000..fceef32
Binary files /dev/null and b/1.RASD/res/RASD CLASS DIAGRAM.vsdx differ
diff --git a/1.RASD/res/RASD SEQUENCE DIAGRAM.vsdx b/1.RASD/res/RASD SEQUENCE DIAGRAM.vsdx
new file mode 100644
index 0000000..1b03211
Binary files /dev/null and b/1.RASD/res/RASD SEQUENCE DIAGRAM.vsdx differ
diff --git a/1.RASD/res/RASD USE CASE.vsdx b/1.RASD/res/RASD USE CASE.vsdx
new file mode 100644
index 0000000..46af1fd
Binary files /dev/null and b/1.RASD/res/RASD USE CASE.vsdx differ
diff --git a/1.RASD/res/alloy/AlloyPowerEnjoy (COPIA DI SICUREZZA).als b/1.RASD/res/alloy/AlloyPowerEnjoy (COPIA DI SICUREZZA).als
new file mode 100644
index 0000000..d664f6c
--- /dev/null
+++ b/1.RASD/res/alloy/AlloyPowerEnjoy (COPIA DI SICUREZZA).als
@@ -0,0 +1,364 @@
+module PowerEnjoy
+
+//SIG
+
+sig Stringa {}
+
+sig Float {
+ leftPart : one Int,
+ rightPart : one Int
+} {
+ leftPart > 0
+ rightPart > 0
+}
+
+sig Car {
+ id : one Int,
+ plate : one Stringa,
+ wCode : one Int,
+ ecs : one ECS,
+ ads : one ADS,
+ status : one CarStatus,
+ request : set RMSS
+} {
+ id > 0
+ wCode > 0
+}
+
+abstract sig RMSS {
+ id : one Int,
+ startTime : one Int,
+ endTime : lone Int,
+ cost : one Float,
+ status : one RequestStatus,
+ paymentStatus : one PaymentStatus,
+ userID : one Int,
+ carID : one Int,
+ userPosition : one Stringa,
+ carPosition : one Stringa,
+ reservation : lone Reservation,
+ rent : lone Rent
+} {
+ id > 0
+ startTime > 0
+ endTime = none or endTime > 0
+ userID > 0
+ carID > 0
+ endTime > startTime
+}
+
+sig Reservation extends RMSS {
+ countDown : one Int
+} {
+ countDown >= 0
+}
+
+sig Rent extends RMSS {
+ mSavingOptionActived : one Bool
+}
+
+sig User {
+ id : one Int,
+ name : one Stringa,
+ surname : one Stringa,
+ email : one Stringa,
+ password : one Stringa,
+ phone : one Stringa,
+ address : one Stringa,
+ SSN : one Stringa,
+ verificationCode : one Stringa,
+ drivingLicence : one Stringa,
+ billingInformation: one BillingInformation,
+ moneySavingOption : one Bool,
+ request : set RMSS
+} {
+ id > 0
+}
+
+sig DeactivatedUser extends User {}
+
+sig ECS {
+ id : one Int,
+} {
+ id > 0
+}
+
+sig ADS {
+ id : one Int
+} {
+ id > 0
+}
+
+sig ParkingArea {
+ id : one Int,
+ name : one Stringa,
+ availableCars : one Int,
+ car : set Car,
+ rechargingArea : set RechargingArea
+} {
+ id > 0
+ availableCars > 0
+}
+
+sig City {
+ id : one Int,
+ name : one Stringa,
+ parkingArea : set ParkingArea
+} {
+ id > 0
+}
+
+sig RechargingArea {
+ id : one Int,
+ plugs : one Int,
+ address : one Stringa,
+ isSpecial : one Bool
+} {
+ id > 0
+ plugs > 0
+}
+
+
+// ENUMS
+
+enum Bool {
+ TRUE,
+ FALSE
+}
+
+enum BillingInformation {
+ CONFIRMED,
+ NOTCONFIRMED
+}
+
+enum PaymentStatus {
+ ACCEPTED,
+ PENDING,
+ DENIED
+}
+
+enum CarStatus {
+ AVAILABLE,
+ RESERVED,
+ UNAVAILABLE,
+ INUSE
+}
+
+enum RequestStatus {
+ ACTIVE,
+ EXPIRED
+}
+
+
+// FACTS
+
+// In any city there is at least a parking area
+fact atLeastAParkingArea {
+ #ParkingArea >= 1
+}
+
+// In any parking area there could be zero or more recharging area
+fact presenceOfRechargingArea {
+ #RechargingArea >= 0
+}
+
+// In any parking area there could be zero or more cars
+fact presenceOfCars {
+ #Car >= 0
+}
+
+// Relation between users and active requests (reservation or rent)
+fact atMaxOneActiveRequestForUser {
+ (all u : User | lone r : RMSS | (u.request = r) and (r.userID = u.id) and (r.status = ACTIVE))
+ // Each user has at maximum an active request at time
+}
+
+// Relation between RMSS and reservation or rent
+fact relationBetweenRequests {
+ (all rm : RMSS | (one res : Reservation | rm.id = res.id) or
+ (one ren : Rent | rm.id = ren.id))
+}
+
+// R
+fact a {
+ all rn : Rent | one rs : Reservation | (rn.userID = rs.userID) and
+ (rn.carID = rs.carID) and (rn.startTime = rs.endTime)
+}
+
+
+fact b {
+ all rn : Rent | no rs : Reservation | rn.id = rs.id
+}
+
+
+fact c {
+ all rs : Reservation | no rn : Rent | rs.id = rn.id
+}
+
+
+// Relation between active requests (reservation or rent) and users
+fact exactelyOneUserForActiveRequest {
+ (all r : RMSS | r.status = ACTIVE implies
+ (one u : User | u.request = r))
+ // Each active request belongs exactely to one user
+}
+
+// Relation between cars and active requests (reservation or rent)
+fact atMaxOneActiveRequestForCar {
+ (all c : Car | lone r : RMSS | (c.request = r) and (r.status = ACTIVE))
+ // Each car has at maximum an active request at time
+}
+
+// Relation between active requests (reservation or rent) and car
+fact exactelyOneCarForActiveRequest {
+ (all r : RMSS | r.status = ACTIVE implies
+ (one c : Car | c.request = r))
+ // Each active request refers exactely to one car
+}
+
+// Relation between deactivated users and active requests (reservation or rent)
+fact noActiveRequestForDeactivatedUser {
+ (no dU : DeactivatedUser | one r : RMSS | (dU.request = r) and (r.status = ACTIVE))
+ // No deactivated users can have an active request
+}
+
+// Relation between active requests (reservation or rent) and deactivated users
+fact noDeactivatedUserForActiveRequest {
+ (all r : RMSS | r.status = ACTIVE implies
+ (no dU : DeactivatedUser | dU.request = r))
+ // Each active request does not belong to any deactivated user
+}
+
+// No duplicated users
+fact noDuplicatedUser {
+ (no u1 , u2 : User | u1.id = u2.id and u1 != u2) and
+ (no u1 , u2 : User | u1.email = u2.email and u1 != u2) and
+ (no u1 , u2 : User | u1.SSN = u2.SSN and u1 != u2) and
+ (no u1 , u2 : User | u1.drivingLicence = u2.drivingLicence and u1 != u2)
+}
+
+// No users with NOTCONFIRMED billing information
+fact noUserWithNotConfirmedBilling {
+ no u : User | u.billingInformation = NOTCONFIRMED
+}
+
+// No duplicated deactivated users
+fact noDuplicatedDeactivatedUser {
+ (no du1 , du2 : DeactivatedUser | du1.id = du2.id and du1 != du2) and
+ (no du1 , du2 : DeactivatedUser | du1.email = du2.email and du1 != du2) and
+ (no du1 , du2 : DeactivatedUser | du1.SSN = du2.SSN and du1 != du2) and
+ (no du1 , du2 : DeactivatedUser | du1.drivingLicence = du2.drivingLicence and du1 != du2)
+}
+
+// No cities with the same ID
+fact noDuplicatedCities {
+ no c1 , c2 : City | c1.id = c2.id and c1 != c2
+}
+
+// No Parking Areas with the same ID
+fact noDuplicatedParkingAreas {
+ no pa1 , pa2 : ParkingArea | pa1.id = pa2.id and pa1 != pa2
+}
+
+// No Recharging Areas with the same ID
+fact noDuplicatedRechargingAreas {
+ no ra1 , ra2 : RechargingArea | ra1.id = ra2.id and ra1 != ra2
+}
+
+// No duplicated requests
+fact noDuplicatedRMSS{
+ (no req1 , req2 : RMSS | req1.id = req2.id and req1 != req2) and
+ (no req1 , req2 : RMSS | (req1.userID = req2.userID and
+ req1.carID = req2.carID and req1.startTime = req2.startTime and
+ req1.endTime = req2.endTime and req1 != req2))
+}
+
+fact noDuplicatedReservation{
+ (no res1 , res2 : Reservation | res1.id = res2.id and res1 != res2) and
+ (no res1 , res2 : Reservation | (res1.userID = res2.userID and
+ res1.carID = res2.carID and res1.startTime = res2.startTime and
+ res1.endTime = res2.endTime and res1 != res2))
+}
+
+fact noDuplicatedRent{
+ (no ren1 , ren2 : Rent | ren1.id = ren2.id and ren1 != ren2) and
+ (no ren1 , ren2 : Rent | (ren1.userID = ren2.userID and
+ ren1.carID = ren2.carID and ren1.startTime = ren2.startTime and
+ ren1.endTime = ren2.endTime and ren1 != ren2))
+}
+
+// No duplicated cars
+fact noDuplicatedCars {
+ (no c1 , c2 : Car | c1.id = c2.id and c1 != c2) and
+ (no c1 , c2 : Car | c1.plate = c2.plate and c1 != c2) and
+ (no c1 , c2 : Car | c1.wCode = c2.wCode and c1 != c2)
+}
+
+// No ECS with the same ID
+fact noDuplicatedECS {
+ no ecs1 , ecs2 : ECS | ecs1.id = ecs2.id and ecs1 != ecs2
+}
+
+// No ADS with the same ID
+fact noDuplicatedADS {
+ no ads1 , ads2 : ADS | ads1.id = ads2.id and ads1 != ads2
+}
+
+// AVAILABLE car
+
+// When a request is active the status of the payment is pending
+fact pendingPaymentForActiveRequest {
+ (all r : RMSS | r.status = ACTIVE implies r.paymentStatus = PENDING)
+}
+
+
+
+//ASSERTION
+
+// The number of active rents is equal to the number of cars in use
+assert equalityOfRentedCarsAndActiveRents {
+ #{r : Rent | r.status = ACTIVE} = #{c : Car | c.status = INUSE}
+}
+//
+//check equalityOfRentedCarsAndActiveRents for 2
+
+// The number of active reservations is equal to the number of cars reserved
+assert equalityOfReservedCarsAndActiveReservations {
+ #{r : Reservation | r.status = ACTIVE} = #{c : Car | c.status = RESERVED}
+}
+//
+//check equalityOfReservedCarsAndActiveReservations for 2
+
+// Same number of requests
+assert equalityOfRequestsAsReservationOrRent {
+ #{rm : RMSS} = (#{rs : Reservation} + #{rn : Rent})
+}
+//
+//check equalityOfRequestsAsReservationOrRent for 1
+
+
+
+pred show {}
+
+run show for 1 but exactly 1 User, exactly 2 RMSS, exactly 1 Rent, exactly 1 Car
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/1.RASD/res/alloy/AlloyPowerEnjoy(DUPLICATO).als b/1.RASD/res/alloy/AlloyPowerEnjoy(DUPLICATO).als
new file mode 100644
index 0000000..bc09fc1
--- /dev/null
+++ b/1.RASD/res/alloy/AlloyPowerEnjoy(DUPLICATO).als
@@ -0,0 +1,480 @@
+module PowerEnjoy
+
+//SIG
+
+sig Stringa {}
+
+sig Float {
+ leftPart : one Int,
+ rightPart : one Int
+} {
+ leftPart > 0
+ rightPart > 0
+}
+
+sig Car {
+ id : one Int,
+ plate : one Stringa,
+ wCode : one Int,
+ ecs : one ECS,
+ ads : one ADS,
+ status : one CarStatus//,
+ //request : set RMSS
+} {
+ id > 0
+ wCode > 0
+}
+
+abstract sig RMSS {
+ id : one Int,
+ startTime : one Int,
+ endTime : lone Int,
+ cost : one Float,
+ status : one RequestStatus,
+ paymentStatus : one PaymentStatus,
+ userID : one Int,
+ carID : one Int,
+ userPosition : one Stringa,
+ carPosition : one Stringa,
+ car : one Car
+ //reservation : lone Reservation,
+ //rent : lone Rent
+} {
+ id > 0
+ startTime > 0
+ endTime = none or endTime > 0
+ userID > 0
+ carID > 0
+ endTime > startTime
+}
+
+sig Reservation extends RMSS {
+ countDown : one Int
+} {
+ countDown >= 0
+}
+
+sig Rent extends RMSS {
+ mSavingOptionActived : one Bool
+}
+
+sig User {
+ id : one Int,
+ name : one Stringa,
+ surname : one Stringa,
+ email : one Stringa,
+ password : one Stringa,
+ phone : one Stringa,
+ address : one Stringa,
+ SSN : one Stringa,
+ verificationCode : one Stringa,
+ drivingLicence : one Stringa,
+ billingInformation: one BillingInformation,
+ moneySavingOption : one Bool,
+ request : set RMSS
+} {
+ id > 0
+}
+
+sig DeactivatedUser extends User {}
+
+sig ECS {
+ id : one Int,
+} {
+ id > 0
+}
+
+sig ADS {
+ id : one Int
+} {
+ id > 0
+}
+
+sig ParkingArea {
+ id : one Int,
+ name : one Stringa,
+ availableCars : one Int,
+ car : set Car,
+ rechargingArea : set RechargingArea
+} {
+ id > 0
+ availableCars > 0
+}
+
+sig City {
+ id : one Int,
+ name : one Stringa,
+ parkingArea : set ParkingArea
+} {
+ id > 0
+}
+
+sig RechargingArea {
+ id : one Int,
+ plugs : one Int,
+ address : one Stringa,
+ isSpecial : one Bool
+} {
+ id > 0
+ plugs > 0
+}
+
+
+// ENUMS
+
+enum Bool {
+ TRUE,
+ FALSE
+}
+
+enum BillingInformation {
+ CONFIRMED,
+ NOTCONFIRMED
+}
+
+enum PaymentStatus {
+ ACCEPTED,
+ PENDING,
+ DENIED
+}
+
+enum CarStatus {
+ AVAILABLE,
+ RESERVED,
+ UNAVAILABLE,
+ INUSE
+}
+
+enum RequestStatus {
+ ACTIVE,
+ EXPIRED
+}
+
+
+// FACTS
+
+// In any city there is at least a parking area
+fact atLeastAParkingArea {
+ #ParkingArea >= 1
+}
+
+// In any parking area there could be zero or more recharging area
+fact presenceOfRechargingArea {
+ #RechargingArea >= 0
+}
+
+// In any parking area there could be zero or more cars
+fact presenceOfCars {
+ #Car >= 0
+}
+
+// Relation between users and active requests (reservation or rent)
+fact atMaxOneActiveRequestForUser {
+ (all u : User | lone r : RMSS | (u.request = r) and (r.userID = u.id) and (r.status = ACTIVE))
+ // Each user has at maximum an active request at time
+}
+
+// Relation between Rent and Reservations
+fact a {
+ all ren : Rent | one res : Reservation | ( (ren.userID = res.userID) and
+ (ren.carID = res.carID) and (ren.startTime = res.endTime) )
+}
+
+// Relation between RMSS and Reservation or Rent
+fact relationBetweenRequests {
+ (all rm : RMSS |
+ (
+ one res : Reservation | ( (rm.id = res.id) and (rm.userID = res.userID)
+ and (rm.carID = res.carID) and (rm.startTime = res.startTime) and
+ (rm.endTime = res.endTime) )
+ )
+ or
+ (
+ one ren : Rent | ( (rm.id = ren.id) and (rm.userID = ren.userID)
+ and (rm.carID = ren.carID) and (rm.startTime = ren.startTime) and
+ (rm.endTime = ren.endTime) )
+ )
+ )
+}
+
+
+
+
+fact b {
+ all ren : Rent | no res : Reservation | ren.id = res.id
+}
+
+
+fact c {
+ all res : Reservation | no ren : Rent | res.id = ren.id
+}
+
+
+// Relation between active requests (reservations or rents) and users
+fact exactelyOneUserForActiveRequest {
+ (all r : RMSS | r.status = ACTIVE implies
+ (one u : User | u.request = r))
+ // Each active request belongs exactely to one user
+}
+
+// Each user can have multiple expired requests (reservations or rents)
+fact multipleExpiredRequests {
+ (all r : RMSS | r.status = EXPIRED implies
+ (one u : User | u.request = r))
+}
+
+// Relation between cars and active requests (reservations or rents)
+fact atMaxOneActiveRequestForCar {
+ (all c : Car | lone r : RMSS | (c.request = r) and (r.status = ACTIVE))
+ // Each car has at maximum an active request at time
+}
+
+
+
+
+// Relation between active requests (reservation or rent) and car
+fact exactelyOneCarForActiveRequest {
+ (all r : RMSS | r.status = ACTIVE implies
+ (one c : Car | c.request = r))
+ // Each active request refers exactely to one car
+}
+
+// Relation between deactivated users and active requests (reservation or rent)
+fact noActiveRequestForDeactivatedUser {
+ (no dU : DeactivatedUser | one r : RMSS | (dU.request = r) and (r.status = ACTIVE))
+ // No deactivated users can have an active request
+}
+
+// Relation between active requests (reservation or rent) and deactivated users
+fact noDeactivatedUserForActiveRequest {
+ (all r : RMSS | r.status = ACTIVE implies
+ (no dU : DeactivatedUser | dU.request = r))
+ // Each active request does not belong to any deactivated user
+}
+
+// No duplicated users
+fact noDuplicatedUser {
+ (no u1 , u2 : User | u1.id = u2.id and u1 != u2) and
+ (no u1 , u2 : User | u1.email = u2.email and u1 != u2) and
+ (no u1 , u2 : User | u1.SSN = u2.SSN and u1 != u2) and
+ (no u1 , u2 : User | u1.drivingLicence = u2.drivingLicence and u1 != u2)
+}
+
+// No users with NOTCONFIRMED billing information
+fact noUserWithNotConfirmedBilling {
+ no u : User | u.billingInformation = NOTCONFIRMED
+}
+
+// No duplicated deactivated users
+fact noDuplicatedDeactivatedUser {
+ (no du1 , du2 : DeactivatedUser | du1.id = du2.id and du1 != du2) and
+ (no du1 , du2 : DeactivatedUser | du1.email = du2.email and du1 != du2) and
+ (no du1 , du2 : DeactivatedUser | du1.SSN = du2.SSN and du1 != du2) and
+ (no du1 , du2 : DeactivatedUser | du1.drivingLicence = du2.drivingLicence and du1 != du2)
+}
+
+// No cities with the same ID
+fact noDuplicatedCities {
+ no c1 , c2 : City | c1.id = c2.id and c1 != c2
+}
+
+// No Parking Areas with the same ID
+fact noDuplicatedParkingAreas {
+ no pa1 , pa2 : ParkingArea | pa1.id = pa2.id and pa1 != pa2
+}
+
+// No Recharging Areas with the same ID
+fact noDuplicatedRechargingAreas {
+ no ra1 , ra2 : RechargingArea | ra1.id = ra2.id and ra1 != ra2
+}
+
+// No duplicated requests
+fact noDuplicatedRMSS{
+ (no req1 , req2 : RMSS | req1.id = req2.id and req1 != req2) and
+ (no req1, req2 : RMSS | req1.userID = req2.userID and
+ req1.carID = req2.carID and req1.startTime = req2.startTime
+ and req1.endTime = req2.endTime and req1 != req2)
+}
+
+fact noDuplicatedReservation{
+ (no res1 , res2 : Reservation | res1.id = res2.id and res1 != res2) and
+ (no res1, res2 : Reservation | res1.userID = res2.userID and
+ res1.carID = res2.carID and res1.startTime = res2.startTime
+ and res1.endTime = res2.endTime and res1 != res2)
+}
+
+fact noDuplicatedRent{
+ (no ren1 , ren2 : Rent | ren1.id = ren2.id and ren1 != ren2) and
+ (no ren1, ren2: Rent | ren1.userID = ren2.userID
+ and ren1.carID = ren2.carID and ren1.startTime = ren2.startTime
+ and ren1.endTime = ren2.endTime and ren1 != ren2)
+}
+
+// Users cannot hold the same reservation
+// fact noDifferentUsersForTheSameReservation{
+// (all r : RMSS | no u1, u2 : User | u1 !)
+//}
+
+
+// USER -- > RENT : SAME MONEY SAVING OPTION
+
+// No duplicated cars
+fact noDuplicatedCars {
+ (no c1 , c2 : Car | c1.id = c2.id and c1 != c2) and
+ (no c1 , c2 : Car | c1.plate = c2.plate and c1 != c2) and
+ (no c1 , c2 : Car | c1.wCode = c2.wCode and c1 != c2)
+}
+
+// No ECS with the same ID
+fact noDuplicatedECS {
+ no ecs1 , ecs2 : ECS | ecs1.id = ecs2.id and ecs1 != ecs2
+}
+
+// No ADS with the same ID
+fact noDuplicatedADS {
+ no ads1 , ads2 : ADS | ads1.id = ads2.id and ads1 != ads2
+}
+
+// AVAILABLE car
+
+// When a request is active the status of the payment is pending
+fact pendingPaymentForActiveRequest {
+ (all r : RMSS | r.status = ACTIVE implies r.paymentStatus = PENDING)
+}
+// When a car is RENTED the related RENT is ACTIVE
+fact aRentedCarIsRelatedToAnActiveRent {
+ (all c : Car | c.status = INUSE implies
+ (one ren : Rent | c.id = ren.carID and ren.status = ACTIVE) and
+ (no res : Reservation | c.id = res.carID and res.status = ACTIVE)
+ )
+}
+
+fact anActiveRentIsRelatedToARentedCar {
+ (all ren : Rent | ren.status = ACTIVE implies
+ (one c : Car | ren.carID = c.id and c.status = INUSE)
+ )
+}
+
+// When a car is RESERVED the related RESERVATION is ACTIVE
+fact aReservedCarIsRelatedToAnActiveReservation {
+ (all c : Car | c.status = RESERVED implies
+ (one res : Reservation | c.id = res.carID and res.status = ACTIVE) and
+ (no ren : Rent | c.id = ren.carID and ren.status = ACTIVE)
+ )
+}
+
+fact anActiveReservationIsRelatedToAReservedCar {
+ (all res : Reservation | res.status = ACTIVE implies
+ (one c : Car | res.carID = c.id and c.status = RESERVED)
+ )
+}
+
+// When a car is UNAVAILABLE, it cannot be RESERVED
+fact noUnavailableReservedCar {
+ all c : Car | c.status = UNAVAILABLE implies
+ (no res : Reservation | res.status = ACTIVE and res.carID = c.id)
+}
+
+
+// When a car is AVAILABLE, it cannot be RENTED
+fact noUnavailableRentedCar {
+ all c : Car | c.status = UNAVAILABLE implies
+ (no ren : Rent | ren.status = ACTIVE and ren.carID = c.id)
+}
+
+// When a reservation is EXPIRED, it still remembers the reserved car
+fact consistencyOfReservation {
+ (all res : Reservation | res.status = EXPIRED implies
+ (one c : Car | res.carID = c.id)
+ )
+}
+
+// When a rent is EXPIRED, it still remembers the rented car
+fact consistencyOfRent {
+ (all ren : Rent | ren.status = EXPIRED implies
+ (one c : Car | ren.carID = c.id)
+ )
+}
+
+
+
+
+
+
+
+
+
+
+
+
+// When a car is INUSE the related RENT is ACTIVE
+// When a car is AVAILABLE
+// When a car is UNAVAILABLE
+
+
+
+
+//ASSERTION
+
+// The number of active rents is equal to the number of cars in use
+assert equalityOfRentedCarsAndActiveRents {
+ #{r : Rent | r.status = ACTIVE} = #{c : Car | c.status = INUSE}
+}
+// check equalityOfRentedCarsAndActiveRents for 8 [no counterexamplefound]
+
+// The number of active reservations is equal to the number of cars reserved
+assert equalityOfReservedCarsAndActiveReservations {
+ #{r : Reservation | r.status = ACTIVE} = #{c : Car | c.status = RESERVED}
+}
+// check equalityOfReservedCarsAndActiveReservations for 8 [no counterexamplefound]
+
+// The number of the Reservation is greater or equal to the number of Rent
+assert noRentWithoutReservation{
+ all u : User |
+ #{res: Reservation | res.userID = u.id } >= #{ren : Rent | ren.userID = u.id}
+}
+//check noRentWithoutReservation for 3
+
+assert z{
+ #{rm : RMSS} >= #{res : Reservation}
+}
+
+//check z for 8
+
+assert zz{
+ #{rm : RMSS} >= #{rn : Rent}
+}
+
+//check zz for 3
+
+assert zzz{
+ #{res : Reservation} < #{req : RMSS}
+}
+
+//check zzz for 2
+
+
+ pred show {}
+
+run show for 4 but exactly 1 User, exactly 1 RMSS, exactly 2 Car
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/1.RASD/res/alloy/AlloyPowerEnjoy.als b/1.RASD/res/alloy/AlloyPowerEnjoy.als
new file mode 100644
index 0000000..e13371d
--- /dev/null
+++ b/1.RASD/res/alloy/AlloyPowerEnjoy.als
@@ -0,0 +1,346 @@
+module PowerEnjoy
+
+//SIG
+
+sig Stringa {}
+
+sig Float {
+ leftPart : one Int,
+ rightPart : one Int
+} {
+ leftPart > 0
+ rightPart > 0
+}
+
+sig User {
+ id : one Int,
+ name : one Stringa,
+ surname : one Stringa,
+ email : one Stringa,
+ password : one Stringa,
+ phone : one Stringa,
+ address : one Stringa,
+ SSN : one Stringa,
+ verificationCode : one Stringa,
+ drivingLicence : one Stringa,
+ billingInformation: one BillingInformation,
+ moneySavingOption : one Bool,
+ request : set RMSS
+} {
+ id > 0
+}
+
+sig Car {
+ id : one Int,
+ plate : one Stringa,
+ wCode : one Int,
+ ecs : one ECS,
+ ads : one ADS,
+ status : one CarStatus
+} {
+ id > 0
+ wCode > 0
+}
+
+abstract sig RMSS {
+ id : one Int,
+ startTime : one Int,
+ endTime : lone Int,
+ cost : one Float,
+ status : one RequestStatus,
+ paymentStatus : one PaymentStatus,
+ userID : one Int,
+ userPosition : one Stringa,
+ carPosition : one Stringa,
+ mSavingOption : one Bool,
+ car : one Car,
+ user : one User
+} {
+ id > 0
+ startTime > 0
+ endTime > 0
+ endTime = none or endTime > 0
+ userID > 0
+ endTime > startTime
+}
+
+sig Reservation extends RMSS {}
+
+sig Rent extends RMSS {}
+
+sig DeactivatedUser extends User {}
+
+sig ECS {
+ id : one Int,
+} {
+ id > 0
+}
+
+sig ADS {
+ id : one Int
+} {
+ id > 0
+}
+
+sig ParkingArea {
+ id : one Int,
+ name : one Stringa,
+ availableCars : one Int,
+ car : set Car,
+ rechargingArea : set RechargingArea
+} {
+ id > 0
+ availableCars > 0
+}
+
+sig City {
+ id : one Int,
+ name : one Stringa,
+ parkingArea : set ParkingArea
+} {
+ id > 0
+}
+
+sig RechargingArea {
+ id : one Int,
+ plugs : one Int,
+ address : one Stringa,
+ isSpecial : one Bool
+} {
+ id > 0
+ plugs > 0
+}
+
+// ENUMS
+
+enum Bool {
+ TRUE,
+ FALSE
+}
+
+enum BillingInformation {
+ CONFIRMED,
+ NOTCONFIRMED
+}
+
+enum PaymentStatus {
+ ACCEPTED,
+ PENDING,
+ DENIED
+}
+
+enum CarStatus {
+ AVAILABLE,
+ RESERVED,
+ UNAVAILABLE,
+ INUSE
+}
+
+enum RequestStatus {
+ ACTIVE,
+ EXPIRED
+}
+
+// FACTS
+
+// In any city there is at least a parking area
+fact atLeastAParkingArea {
+ #ParkingArea >= 1
+}
+
+
+
+// In any parking area there could be zero or more recharging area
+fact presenceOfRechargingArea {
+ #RechargingArea >= 0
+}
+
+// In any parking area there could be zero or more cars
+fact presenceOfCars {
+ #Car >= 0
+}
+
+// No ECS with the same ID
+fact noDuplicatedECS {
+ (no ecs1 , ecs2 : ECS | ecs1.id = ecs2.id and ecs1 != ecs2)
+}
+
+// No ADS with the same ID
+fact noDuplicatedADS {
+ (no ads1 , ads2 : ADS | ads1.id = ads2.id and ads1 != ads2)
+}
+
+// The same ECS cannot be used by two different Cars
+fact theSameECSCannotBeUsedByDifferentCars {
+ no disj c1, c2 : Car | c1.ecs = c2.ecs
+}
+
+// The same ADS cannot be used by two different Cars
+fact theSameADSCannotBeUsedByDifferentCars {
+ no disj c1, c2 : Car | c1.ads = c2.ads
+}
+
+// No Duplicated Users
+fact noDuplicatedUser {
+ (no u1 , u2 : User | u1.id = u2.id and u1 != u2) and
+ (no u1 , u2 : User | u1.email = u2.email and u1 != u2) and
+ (no u1 , u2 : User | u1.SSN = u2.SSN and u1 != u2) and
+ (no u1 , u2 : User | u1.drivingLicence = u2.drivingLicence and u1 != u2)
+}
+
+
+
+// No Users with NOTCONFIRMED Billing Information
+fact noUserWithNotConfirmedBilling {
+ no u : User | u.billingInformation = NOTCONFIRMED
+}
+
+// No Cities with the same ID
+fact noDuplicatedCities {
+ no c1 , c2 : City | c1.id = c2.id and c1 != c2
+}
+
+// No Parking Areas with the same ID
+fact noDuplicatedParkingAreas {
+ no pa1 , pa2 : ParkingArea | pa1.id = pa2.id and pa1 != pa2
+}
+
+// No Recharging Areas with the same ID
+fact noDuplicatedRechargingAreas {
+ no ra1 , ra2 : RechargingArea | ra1.id = ra2.id and ra1 != ra2
+}
+
+// No Duplicated Requests
+fact noDuplicatedRMSS {
+ (no req1 , req2 : RMSS | req1.id = req2.id and req1 != req2) and
+ (no req1, req2 : RMSS | req1.userID = req2.userID and
+ req1.car = req2.car and req1.startTime = req2.startTime
+ and req1.endTime = req2.endTime and req1 != req2)
+}
+
+// No Duplicated Cars
+fact noDuplicatedCars {
+ (no c1 , c2 : Car | c1.id = c2.id and c1 != c2) and
+ (no c1 , c2 : Car | c1.plate = c2.plate and c1 != c2) and
+ (no c1 , c2 : Car | c1.wCode = c2.wCode and c1 != c2)
+}
+
+// When a car is RENTED the related RENT is ACTIVE and viceversa
+fact aRentedCarIsRelatedToAnActiveRent {
+ (all c : Car | c.status = INUSE implies
+ (one ren : Rent | ren.car = c and ren.status = ACTIVE) and
+ (no res : Reservation | res.car = c and res.status = ACTIVE) )
+ and
+ (all ren : Rent | ren.status = ACTIVE implies
+ (one c : Car | ren.car = c and c.status = INUSE)
+ )
+}
+
+// When a car is RESERVED the related RESERVATION is ACTIVE and viceversa
+fact aReservedCarIsRelatedToAnActiveReservation {
+ (all c : Car | c.status = RESERVED implies
+ (one res : Reservation | res.car = c and res.status = ACTIVE) and
+ (no ren : Rent | ren.car = c and ren.status = ACTIVE)
+ ) and
+ (all res : Reservation | res.status = ACTIVE implies
+ (one c : Car | res.car = c and c.status = RESERVED)
+ )
+}
+
+// When a car is UNAVAILABLE, it cannot be RESERVED nor RENTED
+fact noUnavailableReservedCar {
+ all c : Car | c.status = UNAVAILABLE implies (
+ (no res : Reservation | res.status = ACTIVE and res.car = c) and
+ (no ren : Rent | ren.status = ACTIVE and ren.car = c)
+ )
+}
+
+// When a request is ACTIVE the status of the payment is PENDING
+fact pendingPaymentForActiveRequest {
+ (all r : RMSS | r.status = ACTIVE implies r.paymentStatus = PENDING)
+}
+
+// No Multiple Users for the same Request
+fact noMultipleUsersForTheSameRequest {
+ no disj u1, u2 : User | u1.request & u2.request != none
+}
+
+// The same Request cannot be performed by two different User
+fact noDifferentUserForTheSameRequest {
+ all r : RMSS | r in r.user.request
+}
+
+// The same User cannot have two ACTIVE Requests
+fact theSameUserCannotPerformTwoActiveRequests {
+ no disj r1, r2 : RMSS | r1.user = r2.user and
+ r1.status = ACTIVE and r2.status = ACTIVE
+}
+
+// The same User cannot start two Request contemporary
+fact noSimultaneousActions {
+ no disj r1, r2 : RMSS | r1.user = r2.user and r1.startTime = r2.startTime
+}
+
+// Relation between deactivated users and active requests (reservation or rent)
+fact noActiveRequestForDeactivatedUser {
+ (all dU : DeactivatedUser | no r : dU.request | (r.status = ACTIVE))
+ // No deactivated users can have an active request
+}
+
+//Consistency of the MoneySavingOption for the ACTIVE Requests
+fact consistencyOfMoneySavingOptionForActiveRequests {
+ (all u : User | u.request.status = ACTIVE implies
+ u.moneySavingOption = u.request.mSavingOption)
+}
+
+// A Rent is possible only as a consequence of a Reservation
+fact rentIsAPossibleConsequenceOfReservation{
+ (all r : Rent | one res : Reservation | res in r.user.request and
+ r.startTime = res.endTime and r.car = res.car)
+}
+
+
+
+// ASSERTIONS
+
+/******* WORKING *******/ //[no counterexamplefound]
+// The number of active rents is equal to the number of cars in use
+assert equalityOfRentedCarsAndActiveRents {
+ #{r : Rent | r.status = ACTIVE} = #{c : Car | c.status = INUSE}
+}
+// check equalityOfRentedCarsAndActiveRents for 10
+
+/******* WORKING *******/ //[no counterexamplefound]
+// The number of active reservations is equal to the number of cars reserved
+assert equalityOfReservedCarsAndActiveReservations {
+ #{r : Reservation | r.status = ACTIVE} = #{c : Car | c.status = RESERVED}
+}
+// check equalityOfReservedCarsAndActiveReservations for 10
+
+/******* WORKING *******/ //[no counterexamplefound]
+//The number of the Reservation is greater or equal to the number of Rent
+assert noRentWithoutReservation {
+ all u : User |
+ #{res: Reservation | res.user = u } >= #{ren : Rent | ren.user = u}
+}
+// check noRentWithoutReservation for 10
+
+/******* WORKING *******/ //[no counterexamplefound]
+//If there is an end time for a Reservation, that must be after the start
+assert requestTimeConsistency {
+ all r : RMSS | r.endTime > 0 implies r.endTime > r.startTime
+}
+// check requestTimeConsistency for 10
+
+
+
+pred show {
+ #User >= 2
+ #DeactivatedUser = 1
+ #RMSS >= 2
+ #Car = 3
+ #{ r : RMSS | r.status = ACTIVE} >= 1
+ #{ r : Rent | r.status = ACTIVE} >= 1
+}
+
+run show for 3
diff --git a/1.RASD/res/alloy/alloy4.2.jar b/1.RASD/res/alloy/alloy4.2.jar
new file mode 100644
index 0000000..3be2161
Binary files /dev/null and b/1.RASD/res/alloy/alloy4.2.jar differ
diff --git a/1.RASD/res/alloy/seconda prova.als b/1.RASD/res/alloy/seconda prova.als
new file mode 100644
index 0000000..5602701
--- /dev/null
+++ b/1.RASD/res/alloy/seconda prova.als
@@ -0,0 +1,340 @@
+module PowerEnjoy
+
+//SIG
+
+sig Stringa {}
+
+sig Float {
+ leftPart : one Int,
+ rightPart : one Int
+} {
+ leftPart > 0
+ rightPart > 0
+}
+
+sig User {
+ id : one Int,
+ name : one Stringa,
+ surname : one Stringa,
+ email : one Stringa,
+ password : one Stringa,
+ phone : one Stringa,
+ address : one Stringa,
+ SSN : one Stringa,
+ verificationCode : one Stringa,
+ drivingLicence : one Stringa,
+ billingInformation: one BillingInformation,
+ moneySavingOption : one Bool,
+ request : set RMSS
+} {
+ id > 0
+}
+
+sig Car {
+ id : one Int,
+ plate : one Stringa,
+ wCode : one Int,
+ ecs : one ECS,
+ ads : one ADS,
+ status : one CarStatus
+} {
+ id > 0
+ wCode > 0
+}
+
+abstract sig RMSS {
+ id : one Int,
+ startTime : one Int,
+ endTime : lone Int,
+ cost : one Float,
+ status : one RequestStatus,
+ paymentStatus : one PaymentStatus,
+ userID : one Int,
+ userPosition : one Stringa,
+ carPosition : one Stringa,
+ mSavingOption : one Bool,
+ car : one Car,
+ user : one User
+} {
+ id > 0
+ startTime > 0
+ endTime > 0
+ endTime = none or endTime > 0
+ userID > 0
+ endTime > startTime
+}
+
+sig Reservation extends RMSS {}
+
+sig Rent extends RMSS {}
+
+sig DeactivatedUser extends User {}
+
+sig ECS {
+ id : one Int,
+} {
+ id > 0
+}
+
+sig ADS {
+ id : one Int
+} {
+ id > 0
+}
+
+sig ParkingArea {
+ id : one Int,
+ name : one Stringa,
+ availableCars : one Int,
+ car : set Car,
+ rechargingArea : set RechargingArea
+} {
+ id > 0
+ availableCars > 0
+}
+
+sig City {
+ id : one Int,
+ name : one Stringa,
+ parkingArea : set ParkingArea
+} {
+ id > 0
+}
+
+sig RechargingArea {
+ id : one Int,
+ plugs : one Int,
+ address : one Stringa,
+ isSpecial : one Bool
+} {
+ id > 0
+ plugs > 0
+}
+
+
+// ENUMS
+
+enum Bool {
+ TRUE,
+ FALSE
+}
+
+enum BillingInformation {
+ CONFIRMED,
+ NOTCONFIRMED
+}
+
+enum PaymentStatus {
+ ACCEPTED,
+ PENDING,
+ DENIED
+}
+
+enum CarStatus {
+ AVAILABLE,
+ RESERVED,
+ UNAVAILABLE,
+ INUSE
+}
+
+enum RequestStatus {
+ ACTIVE,
+ EXPIRED
+}
+
+// FACTS
+
+// In any city there is at least a parking area
+fact atLeastAParkingArea {
+ #ParkingArea >= 1
+}
+
+// In any parking area there could be zero or more recharging area
+fact presenceOfRechargingArea {
+ #RechargingArea >= 0
+}
+
+// In any parking area there could be zero or more cars
+fact presenceOfCars {
+ #Car >= 0
+}
+
+// No ECS with the same ID
+fact noDuplicatedECS {
+ (no ecs1 , ecs2 : ECS | ecs1.id = ecs2.id and ecs1 != ecs2)
+}
+
+// No ADS with the same ID
+fact noDuplicatedADS {
+ (no ads1 , ads2 : ADS | ads1.id = ads2.id and ads1 != ads2)
+}
+
+// The same ECS cannot be used by two different Cars
+fact theSameECSCannotBeUsedByDifferentCars {
+ no disj c1, c2 : Car | c1.ecs = c2.ecs
+}
+
+// The same ADS cannot be used by two different Cars
+fact theSameADSCannotBeUsedByDifferentCars {
+ no disj c1, c2 : Car | c1.ads = c2.ads
+}
+
+// No Duplicated Users
+fact noDuplicatedUser {
+ (no u1 , u2 : User | u1.id = u2.id and u1 != u2) and
+ (no u1 , u2 : User | u1.email = u2.email and u1 != u2) and
+ (no u1 , u2 : User | u1.SSN = u2.SSN and u1 != u2) and
+ (no u1 , u2 : User | u1.drivingLicence = u2.drivingLicence and u1 != u2)
+}
+
+// No Users with NOTCONFIRMED Billing Information
+fact noUserWithNotConfirmedBilling {
+ no u : User | u.billingInformation = NOTCONFIRMED
+}
+
+// No Cities with the same ID
+fact noDuplicatedCities {
+ no c1 , c2 : City | c1.id = c2.id and c1 != c2
+}
+
+// No Parking Areas with the same ID
+fact noDuplicatedParkingAreas {
+ no pa1 , pa2 : ParkingArea | pa1.id = pa2.id and pa1 != pa2
+}
+
+// No Recharging Areas with the same ID
+fact noDuplicatedRechargingAreas {
+ no ra1 , ra2 : RechargingArea | ra1.id = ra2.id and ra1 != ra2
+}
+
+// No Duplicated Requests
+fact noDuplicatedRMSS {
+ (no req1 , req2 : RMSS | req1.id = req2.id and req1 != req2) and
+ (no req1, req2 : RMSS | req1.userID = req2.userID and
+ req1.car = req2.car and req1.startTime = req2.startTime
+ and req1.endTime = req2.endTime and req1 != req2)
+}
+
+// No Duplicated Cars
+fact noDuplicatedCars {
+ (no c1 , c2 : Car | c1.id = c2.id and c1 != c2) and
+ (no c1 , c2 : Car | c1.plate = c2.plate and c1 != c2) and
+ (no c1 , c2 : Car | c1.wCode = c2.wCode and c1 != c2)
+}
+
+// When a car is RENTED the related RENT is ACTIVE and viceversa
+fact aRentedCarIsRelatedToAnActiveRent {
+ (all c : Car | c.status = INUSE implies
+ (one ren : Rent | ren.car = c and ren.status = ACTIVE) and
+ (no res : Reservation | res.car = c and res.status = ACTIVE)
+ ) and
+ (all ren : Rent | ren.status = ACTIVE implies
+ (one c : Car | ren.car = c and c.status = INUSE)
+ )
+}
+
+// When a car is RESERVED the related RESERVATION is ACTIVE and viceversa
+fact aReservedCarIsRelatedToAnActiveReservation {
+ (all c : Car | c.status = RESERVED implies
+ (one res : Reservation | res.car = c and res.status = ACTIVE) and
+ (no ren : Rent | ren.car = c and ren.status = ACTIVE)
+ ) and
+ (all res : Reservation | res.status = ACTIVE implies
+ (one c : Car | res.car = c and c.status = RESERVED)
+ )
+}
+
+// When a car is UNAVAILABLE, it cannot be RESERVED nor RENTED
+fact noUnavailableReservedCar {
+ all c : Car | c.status = UNAVAILABLE implies (
+ (no res : Reservation | res.status = ACTIVE and res.car = c) and
+ (no ren : Rent | ren.status = ACTIVE and ren.car = c)
+ )
+}
+
+// When a request is ACTIVE the status of the payment is PENDING
+fact pendingPaymentForActiveRequest {
+ (all r : RMSS | r.status = ACTIVE implies r.paymentStatus = PENDING)
+}
+
+// NONCANCELLAREOTIUCCIDO
+fact noMultipleUserForTheSameRequest {
+ no disj u1, u2 : User | u1.request & u2.request != none
+}
+
+// The same Request cannot be performed by two different User
+fact noDifferentUserForTheSameRequest {
+ all r : RMSS | r in r.user.request
+}
+
+// The same User cannot have two ACTIVE Requests
+fact theSameUserCannotPerformTwoActiveRequests {
+ no disj r1, r2 : RMSS | r1.user = r2.user and r1.status = ACTIVE and r2.status = ACTIVE
+}
+
+// The same User cannot start two Request contemporary
+fact noSimultaneousActions {
+ no disj r1, r2 : RMSS | r1.user = r2.user and r1.startTime = r2.startTime
+}
+
+// Relation between deactivated users and active requests (reservation or rent)
+fact noActiveRequestForDeactivatedUser {
+ (all dU : DeactivatedUser | no r : dU.request | (r.status = ACTIVE))
+ // No deactivated users can have an active request
+}
+
+//Consistency of the MoneySavingOption for the ACTIVE Requests
+fact consistencyOfMoneySavingOptionForActiveRequests {
+ (all u : User | u.request.status = ACTIVE implies u.moneySavingOption = u.request.mSavingOption)
+}
+
+// A Rent is possible only as a consequence of a Reservation
+fact rentIsAPossibleConsequenceOfReservation{
+ (all r : Rent | one res : Reservation | res in r.user.request and r.startTime = res.endTime and r.car = res.car)
+}
+
+
+
+// ASSERTIONS
+
+/******* WORKING *******/
+// The number of active rents is equal to the number of cars in use
+assert equalityOfRentedCarsAndActiveRents {
+ #{r : Rent | r.status = ACTIVE} = #{c : Car | c.status = INUSE}
+}
+// check equalityOfRentedCarsAndActiveRents for 10 [no counterexamplefound]
+
+/******* WORKING *******/
+// The number of active reservations is equal to the number of cars reserved
+assert equalityOfReservedCarsAndActiveReservations {
+ #{r : Reservation | r.status = ACTIVE} = #{c : Car | c.status = RESERVED}
+}
+// check equalityOfReservedCarsAndActiveReservations for 10 //[no counterexamplefound]
+
+/******* WORKING *******/
+//The number of the Reservation is greater or equal to the number of Rent
+assert noRentWithoutReservation {
+ all u : User |
+ #{res: Reservation | res.user = u } >= #{ren : Rent | ren.user = u}
+}
+// check noRentWithoutReservation for 10 //[no counterexamplefound]
+
+/******* WORKING *******/
+//If there is an end time for a Reservation, that must be after the start
+assert requestTimeConsistency {
+ all r : RMSS | r.endTime > 0 implies r.endTime > r.startTime
+}
+// check requestTimeConsistency for 10 //[no counterexamplefound]
+
+
+
+pred show {
+ #User = 3
+ #DeactivatedUser = 0
+ #RMSS = 3
+ #Car = 2
+ #{ r : RMSS | r.status = ACTIVE} >= 2
+ #{ r : Rent | r.status = ACTIVE} >= 1
+}
+
+run show for 3
diff --git a/1.RASD/res/img/ClassD.png b/1.RASD/res/img/ClassD.png
new file mode 100644
index 0000000..f2fe727
Binary files /dev/null and b/1.RASD/res/img/ClassD.png differ
diff --git a/1.RASD/res/img/Usecase_disuser.png b/1.RASD/res/img/Usecase_disuser.png
new file mode 100644
index 0000000..eed57c1
Binary files /dev/null and b/1.RASD/res/img/Usecase_disuser.png differ
diff --git a/1.RASD/res/img/Usecase_guest.png b/1.RASD/res/img/Usecase_guest.png
new file mode 100644
index 0000000..cd79c95
Binary files /dev/null and b/1.RASD/res/img/Usecase_guest.png differ
diff --git a/1.RASD/res/img/alloy_PROVA.pdf b/1.RASD/res/img/alloy_PROVA.pdf
new file mode 100644
index 0000000..18e61da
Binary files /dev/null and b/1.RASD/res/img/alloy_PROVA.pdf differ
diff --git a/1.RASD/res/img/alloy_mondo_1.pdf b/1.RASD/res/img/alloy_mondo_1.pdf
new file mode 100644
index 0000000..c32d24f
Binary files /dev/null and b/1.RASD/res/img/alloy_mondo_1.pdf differ
diff --git a/1.RASD/res/img/alloy_mondo_2.pdf b/1.RASD/res/img/alloy_mondo_2.pdf
new file mode 100644
index 0000000..7676f9e
Binary files /dev/null and b/1.RASD/res/img/alloy_mondo_2.pdf differ
diff --git a/1.RASD/res/img/alloy_mondo_3.pdf b/1.RASD/res/img/alloy_mondo_3.pdf
new file mode 100644
index 0000000..a0618b3
Binary files /dev/null and b/1.RASD/res/img/alloy_mondo_3.pdf differ
diff --git a/1.RASD/res/img/hours.png b/1.RASD/res/img/hours.png
new file mode 100644
index 0000000..21137b7
Binary files /dev/null and b/1.RASD/res/img/hours.png differ
diff --git a/1.RASD/res/img/logopm.pdf b/1.RASD/res/img/logopm.pdf
new file mode 100644
index 0000000..3ab2531
Binary files /dev/null and b/1.RASD/res/img/logopm.pdf differ
diff --git a/1.RASD/res/img/logopm.svg b/1.RASD/res/img/logopm.svg
new file mode 100644
index 0000000..0326ad7
--- /dev/null
+++ b/1.RASD/res/img/logopm.svg
@@ -0,0 +1,65 @@
+
+
+
+
diff --git a/1.RASD/res/img/seqdia_checkavailability.png b/1.RASD/res/img/seqdia_checkavailability.png
new file mode 100644
index 0000000..cf951db
Binary files /dev/null and b/1.RASD/res/img/seqdia_checkavailability.png differ
diff --git a/1.RASD/res/img/seqdia_contact.png b/1.RASD/res/img/seqdia_contact.png
new file mode 100644
index 0000000..387512b
Binary files /dev/null and b/1.RASD/res/img/seqdia_contact.png differ
diff --git a/1.RASD/res/img/seqdia_editbilling.png b/1.RASD/res/img/seqdia_editbilling.png
new file mode 100644
index 0000000..83eca46
Binary files /dev/null and b/1.RASD/res/img/seqdia_editbilling.png differ
diff --git a/1.RASD/res/img/seqdia_editinfo.png b/1.RASD/res/img/seqdia_editinfo.png
new file mode 100644
index 0000000..bc1d7d9
Binary files /dev/null and b/1.RASD/res/img/seqdia_editinfo.png differ
diff --git a/1.RASD/res/img/seqdia_login.png b/1.RASD/res/img/seqdia_login.png
new file mode 100644
index 0000000..9344af2
Binary files /dev/null and b/1.RASD/res/img/seqdia_login.png differ
diff --git a/1.RASD/res/img/seqdia_login.svg b/1.RASD/res/img/seqdia_login.svg
new file mode 100644
index 0000000..6cfc18e
--- /dev/null
+++ b/1.RASD/res/img/seqdia_login.svg
@@ -0,0 +1,315 @@
+
+
+
+
diff --git a/1.RASD/res/img/seqdia_opencar.png b/1.RASD/res/img/seqdia_opencar.png
new file mode 100644
index 0000000..06e25c6
Binary files /dev/null and b/1.RASD/res/img/seqdia_opencar.png differ
diff --git a/1.RASD/res/img/seqdia_reg.png b/1.RASD/res/img/seqdia_reg.png
new file mode 100644
index 0000000..5225a34
Binary files /dev/null and b/1.RASD/res/img/seqdia_reg.png differ
diff --git a/1.RASD/res/img/seqdia_reg.svg b/1.RASD/res/img/seqdia_reg.svg
new file mode 100644
index 0000000..5f11b48
--- /dev/null
+++ b/1.RASD/res/img/seqdia_reg.svg
@@ -0,0 +1,744 @@
+
+
+
+
diff --git a/1.RASD/res/img/seqdia_rent.png b/1.RASD/res/img/seqdia_rent.png
new file mode 100644
index 0000000..73b3130
Binary files /dev/null and b/1.RASD/res/img/seqdia_rent.png differ
diff --git a/1.RASD/res/img/seqdia_reservation.png b/1.RASD/res/img/seqdia_reservation.png
new file mode 100644
index 0000000..d9235a6
Binary files /dev/null and b/1.RASD/res/img/seqdia_reservation.png differ
diff --git a/1.RASD/res/img/seqdia_usecar.png b/1.RASD/res/img/seqdia_usecar.png
new file mode 100644
index 0000000..7c1ac8d
Binary files /dev/null and b/1.RASD/res/img/seqdia_usecar.png differ
diff --git a/1.RASD/res/img/usecase_user.png b/1.RASD/res/img/usecase_user.png
new file mode 100644
index 0000000..b9a5396
Binary files /dev/null and b/1.RASD/res/img/usecase_user.png differ
diff --git a/1.RASD/settings/alloy.sty b/1.RASD/settings/alloy.sty
new file mode 100644
index 0000000..37f96c9
--- /dev/null
+++ b/1.RASD/settings/alloy.sty
@@ -0,0 +1,101 @@
+% alloy.sty
+% Alloy mode for the LaTeX listings package.
+% This is public domain
+
+\lstdefinelanguage{alloy}{
+ keywords={%
+ assert, pred, all, no, lone, one, some, check, run,
+ but, let, implies, not, iff, in, and, or, set, sig, Int, int,
+ if, then, else, exactly, disj, fact, fun, module, abstract,
+ extends, open, none, univ, iden, seq,
+ },
+ literate=%
+ {:}{$\colon$}1
+ {|}{$\bullet$}1
+ {==}{$=$}1
+ {=}{$=$}1
+ {!=}{$\neq$}1
+ {&&}{$\land$}1
+ {||}{$\lor$}1
+ {<=}{$\le$}1
+ {>=}{$\ge$}1
+ {all}{$\forall$}1
+ {exists}{$\exists$}1
+ {!in}{$\not\in$}1
+ {\\in}{$\in$}1
+ {=>}{$\implies$}2
+ % the following isn't actually Alloy, but it gives the option to produce nicer latex
+ {|=>}{$\Rightarrow$}2
+ {<=set}{$\subseteq$}1
+ {+set}{$\cup$}1
+ {*set}{$\cap$}1
+ {==>}{$\Longrightarrow$}3
+ {<==>}{$\Longleftrightarrow$}4
+ {...}{$\ldots$}1
+ {\\hl}{$\hline$}1
+ {\\alpha}{$\alpha$}1
+ {\\beta}{$\beta$}1
+ {\\gamma}{$\gamma$}1
+ {\\delta}{$\delta$}1
+ {\\epsilon}{$\epsilon$}1
+ {\\zeta}{$\zeta$}1
+ {\\eta}{$\eta$}1
+ {\\theta}{$\theta$}1
+ {\\iota}{$\iota$}1
+ {\\kappa}{$\kappa$}1
+ {\\lambda}{$\lambda$}1
+ {\\mu}{$\mu$}1
+ {\\nu}{$\nu$}1
+ {\\xi}{$\xi$}1
+ {\\pi}{$\pi$}1
+ {\\rho}{$\rho$}1
+ {\\sigma}{$\sigma$}1
+ {\\tau}{$\tau$}1
+ {\\upsilon}{$\upsilon$}1
+ {\\phi}{$\phi$}1
+ {\\chi}{$\chi$}1
+ {\\psi}{$\psi$}1
+ {\\omega}{$\omega$}1
+ {\\Gamma}{$\Gamma$}1
+ {\\Delta}{$\Delta$}1
+ {\\Theta}{$\Theta$}1
+ {\\Lambda}{$\Lambda$}1
+ {\\Xi}{$\Xi$}1
+ {\\Pi}{$\Pi$}1
+ {\\Sigma}{$\Sigma$}1
+ {\\Upsilon}{$\Upsilon$}1
+ {\\Phi}{$\Phi$}1
+ {\\Psi}{$\Psi$}1
+ {\\Omega}{$\Omega$}1
+ {\\EOF}{\;}1
+ ,
+ sensitive=true, % case sensitive
+ morecomment=[l]//,%
+ morecomment=[l]{--},%
+ morecomment=[s]{/*}{*/},%
+ morestring=[b]",
+ numbers=none,
+ firstnumber=1,
+ numberstyle=\tiny,
+ stepnumber=2,
+ basicstyle=\scriptsize\ttfamily,
+ commentstyle=\itshape,
+ keywordstyle=\bfseries,
+ ndkeywordstyle=\bfseries,
+}
+
+% inline
+\def\A{%
+ \lstinline[language=alloy,basicstyle=\ttfamily,columns=fixed]}
+
+% paragraph
+\lstnewenvironment{alloy}[1][]{%
+ \lstset{language=alloy,
+ floatplacement={tbp},captionpos=b,
+ xleftmargin=8pt,xrightmargin=8pt,basicstyle=\ttfamily,#1}}{}
+
+% paragraph from file
+\newcommand{\alloyfile}[1]{
+ \lstinputlisting[language=alloy,%
+ frame=lines,xleftmargin=8pt,xrightmargin=8pt,basicstyle=\ttfamily,columns=fixed]{#1}
+}
\ No newline at end of file
diff --git a/1.RASD/settings/mychapterheadings.sty b/1.RASD/settings/mychapterheadings.sty
new file mode 100644
index 0000000..5959008
--- /dev/null
+++ b/1.RASD/settings/mychapterheadings.sty
@@ -0,0 +1,33 @@
+\usepackage[usename]{xcolor}
+
+% Titoli di capitolo con numerazione
+\def\@makechapterhead#1{%
+ \vspace*{6\p@}%
+ {\parindent \z@ \reset@font
+ %\thickhrulefill
+ \par\nobreak
+
+ {\color{gray} \bfseries \fontsize{60}{65}\selectfont \thechapter}
+ {\sffamily \hspace{1em} \huge #1}
+
+ \par\nobreak
+ \interlinepenalty\@M
+ %\hrule
+ \vspace*{10\p@}%
+ \vskip 30\p@
+ }}
+
+% Titoli capitolo senza numerazione (e.g. Indice)
+\def\@makeschapterhead#1{%
+ \vspace*{30\p@}%
+ {\parindent \z@ \reset@font
+ %\thickhrulefill
+ \par\nobreak
+ {\sffamily \huge #1}
+ \par\nobreak
+ \interlinepenalty\@M
+ %\hrule
+ \vspace*{10\p@}%
+ \vskip 30\p@
+ }}
+
diff --git a/1.RASD/settings/theme.tex b/1.RASD/settings/theme.tex
new file mode 100644
index 0000000..bbadbce
--- /dev/null
+++ b/1.RASD/settings/theme.tex
@@ -0,0 +1,44 @@
+%% STILE DELLE INTESTAZIONI %%
+
+\pagestyle{fancy}
+\renewcommand{\chaptermark}[1]{\markboth{#1}{}} % aggiungi \thechapter.\ per anche il numero capitolo
+%\renewcommand{\sectionmark}[1]{\markright{#1}} % titoli di sezione
+\fancyhf{}
+\fancyhead[RE,RO]{\small\thepage}
+\fancyhead[LE,LO]{\small\em\leftmark} % \leftmark = 2.TitoloCapitolo, \rightmark = TitoloSezione
+%\fancyhead[LO]{\small\em\rightmark} % LO = Left Odd, RO = Right Odd, LE = Left Even, RE = Right Even
+\fancypagestyle{plain}{ % titolo di sezione e simili
+ \fancyhf{} % remove everything
+ \renewcommand{\headrulewidth}{0pt} % remove lines as well
+ \renewcommand{\footrulewidth}{0pt}
+}
+
+%% Stile dei titoli di capitolo %%
+\makeatletter
+\def\thickhrulefill{\leavevmode \leaders \hrule height 0.7ex \hfill \kern \z@}
+\def\@makechapterhead#1{%
+ \vspace*{10\p@}%
+ {\parindent \z@ \centering \reset@font
+ %\thickhrulefill
+ \par\nobreak \vspace{3\p@}
+ {\huge \bfseries \sffamily \strut \thechapter.\ #1}\par\nobreak
+ \interlinepenalty\@M
+ \hrule
+ \vspace*{10\p@}%
+ \vskip 30\p@
+ }}
+
+\def\@makeschapterhead#1{%
+ \vspace*{10\p@}%
+ \vspace*{10\p@}%
+ {\parindent \z@ \centering \reset@font
+ %\thickhrulefill
+ \par\nobreak \vspace{3\p@}
+ {\huge \bfseries \sffamily \strut #1}\par\nobreak
+ \interlinepenalty\@M
+ \hrule
+ \vspace*{10\p@}%
+ \vskip 30\p@
+ }}
+
+
diff --git a/2.Design Document/DD.lyx b/2.Design Document/DD.lyx
new file mode 100644
index 0000000..8a54dff
--- /dev/null
+++ b/2.Design Document/DD.lyx
@@ -0,0 +1,6080 @@
+#LyX 2.2 created this file. For more info see http://www.lyx.org/
+\lyxformat 508
+\begin_document
+\begin_header
+\save_transient_properties true
+\origin unavailable
+\textclass article
+\begin_preamble
+\usepackage{listings}
+\usepackage{xcolor}
+\usepackage{pdflscape}
+\usepackage{courier}
+%\usepackage{mathtools}
+\usepackage{graphicx}
+\usepackage{booktabs}
+\usepackage[T1]{fontenc}
+\usepackage{lmodern}
+
+\usepackage{listings}
+\lstset{columns=fullflexible}
+
+\usepackage{charter}
+
+\usepackage{xspace}
+\usepackage{algorithmicx}
+\usepackage{algpseudocode}
+
+
+% Definizione intestazioni e pie' di pagina
+\usepackage{fancyhdr}
+
+% _____________________________
+\lstdefinelanguage{JS}{
+keywords={typeof, new, true, false, catch, function, return, null, catch, switch, var, if, in, while, do, else, case, break},
+keywordstyle=\color{blue}\bfseries,
+ndkeywords={class, export, boolean, throw, implements, import, this}, ndkeywordstyle=\color{darkgray}\bfseries,
+identifierstyle=\color{black},
+sensitive=false,
+comment=[l]{//},
+morecomment=[s]{/*}{*/},
+commentstyle=\color{purple}\ttfamily,
+stringstyle=\color{red}\ttfamily,
+morestring=[b]',
+morestring=[b]"
+}
+
+
+\definecolor{dkgreen}{rgb}{0,0.6,0}
+\definecolor{gray}{rgb}{0.5,0.5,0.5}
+\definecolor{mauve}{rgb}{0.58,0,0.82}
+\lstset{frame=tb,
+language=JS,
+aboveskip=3mm,
+belowskip=3mm,
+showstringspaces=false,
+columns=flexible,
+basicstyle={\small\ttfamily},
+numbers=none,
+numberstyle=\tiny\color{gray},
+keywordstyle=\color{blue},
+commentstyle=\color{dkgreen},
+stringstyle=\color{mauve},
+breaklines=true,
+breakatwhitespace=true,
+tabsize=3 }
+
+% _____________________________
+\end_preamble
+\use_default_options true
+\begin_modules
+InStar
+graphicboxes
+fix-cm
+fixltx2e
+fixme
+customHeadersFooters
+pdfform
+\end_modules
+\maintain_unincluded_children false
+\begin_forced_local_layout
+Format 60
+Style "In Preamble"
+ Category "FrontMatter"
+ Margin Static
+ LatexType Paragraph
+ InTitle 0
+ InPreamble 1
+ TocLevel -1000
+ NeedProtect 0
+ KeepEmpty 0
+ NextNoIndent 0
+ CommandDepth 0
+ LatexName "dummy"
+ ItemCommand item
+ LabelType No_Label
+ EndLabelType No_Label
+ ParagraphGroup "0"
+ ParIndent MM
+ ParSkip 0.4
+ ItemSep 0
+ TopSep 0
+ BottomSep 0
+ LabelBottomSep 0
+ ParSep 0
+ NewLine 1
+ Align Block
+ AlignPossible Block, Center, Layout, Left, Right
+ FreeSpacing 0
+ PassThru 0
+ ParbreakIsNewline 0
+ RefPrefix OFF
+ HTMLLabelFirst 0
+ HTMLStyle
+div.standard {
+margin-bottom: 2ex;
+}
+ EndHTMLStyle
+ HTMLForceCSS 0
+ HTMLTitle 0
+ Spellcheck 1
+ ForceLocal 1
+End
+Style "In Title"
+ Category "FrontMatter"
+ Margin Static
+ LatexType Paragraph
+ InTitle 1
+ InPreamble 0
+ TocLevel -1000
+ NeedProtect 0
+ KeepEmpty 0
+ NextNoIndent 0
+ CommandDepth 0
+ LatexName "dummy"
+ ItemCommand item
+ LabelType No_Label
+ EndLabelType No_Label
+ ParagraphGroup "0"
+ ParIndent MM
+ ParSkip 0.4
+ ItemSep 0
+ TopSep 0
+ BottomSep 0
+ LabelBottomSep 0
+ ParSep 0
+ NewLine 1
+ Align Block
+ AlignPossible Block, Center, Layout, Left, Right
+ FreeSpacing 0
+ PassThru 0
+ ParbreakIsNewline 0
+ RefPrefix OFF
+ HTMLLabelFirst 0
+ HTMLStyle
+div.standard {
+margin-bottom: 2ex;
+}
+ EndHTMLStyle
+ HTMLForceCSS 0
+ HTMLTitle 0
+ Spellcheck 1
+ ForceLocal 1
+End
+\end_forced_local_layout
+\language english
+\language_package default
+\inputencoding auto
+\fontencoding global
+\font_roman "default" "default"
+\font_sans "default" "default"
+\font_typewriter "default" "default"
+\font_math "auto" "auto"
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_osf false
+\font_sf_scale 100 100
+\font_tt_scale 100 100
+\graphics default
+\default_output_format default
+\output_sync 1
+\bibtex_command default
+\index_command default
+\float_placement H
+\paperfontsize default
+\spacing single
+\use_hyperref true
+\pdf_bookmarks true
+\pdf_bookmarksnumbered false
+\pdf_bookmarksopen false
+\pdf_bookmarksopenlevel 1
+\pdf_breaklinks false
+\pdf_pdfborder false
+\pdf_colorlinks false
+\pdf_backref false
+\pdf_pdfusetitle true
+\papersize default
+\use_geometry true
+\use_package amsmath 1
+\use_package amssymb 1
+\use_package cancel 1
+\use_package esint 1
+\use_package mathdots 1
+\use_package mathtools 1
+\use_package mhchem 1
+\use_package stackrel 1
+\use_package stmaryrd 1
+\use_package undertilde 1
+\cite_engine basic
+\cite_engine_type default
+\biblio_style plain
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\justification true
+\use_refstyle 1
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\leftmargin 2.5cm
+\rightmargin 2.5cm
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\quotes_language english
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\end_header
+
+\begin_body
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{titlepage}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+
+\backslash
+newcommand{
+\backslash
+HRule}{
+\backslash
+rule{
+\backslash
+linewidth}{0.5mm}}
+\end_layout
+
+\begin_layout Plain Layout
+
+
+\backslash
+center
+\end_layout
+
+\begin_layout Plain Layout
+
+
+\backslash
+textsc{
+\backslash
+LARGE Politecnico di Milano}
+\backslash
+
+\backslash
+[1.5cm]
+\backslash
+textsc{
+\backslash
+Large PowerEnjoy}
+\backslash
+
+\backslash
+[0.5cm]
+\end_layout
+
+\begin_layout Plain Layout
+
+
+\backslash
+textsc{
+\backslash
+Large Software Engineering 2}
+\backslash
+
+\backslash
+[0.5cm]
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+
+\backslash
+HRule
+\backslash
+
+\backslash
+[0.4cm] {
+\backslash
+huge
+\backslash
+bfseries Design Document}
+\backslash
+
+\backslash
+[0.4cm]
+\backslash
+HRule
+\backslash
+
+\backslash
+[1.5cm]
+\end_layout
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{minipage}{0.4
+\backslash
+textwidth}
+\backslash
+begin{flushleft}
+\backslash
+large
+\backslash
+emph{Authors:}
+\backslash
+
+\backslash
+ Giancarlo
+\backslash
+textsc{Colaci}
+\backslash
+newline Giulio
+\backslash
+textsc{De Pasquale}
+\backslash
+newline Francesco
+\backslash
+textsc{Rinaldi}
+\backslash
+end{flushleft}
+\backslash
+end{minipage} ~
+\backslash
+begin{minipage}{0.4
+\backslash
+textwidth}
+\backslash
+begin{flushright}
+\backslash
+large
+\backslash
+emph{Supervisor:}
+\backslash
+
+\backslash
+ Elisabetta
+\backslash
+textsc{De Nitto}
+\backslash
+end{flushright}
+\backslash
+end{minipage}
+\backslash
+
+\backslash
+[3cm]
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Graphics
+ filename res/img/logopm.pdf
+ width 30text%
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vfill
+\end_layout
+
+\begin_layout Plain Layout
+
+{
+\backslash
+large
+\backslash
+today}
+\backslash
+
+\backslash
+[3cm]
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{titlepage}
+\end_layout
+
+\end_inset
+
+
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+mbox{}
+\backslash
+thispagestyle{empty}
+\backslash
+newpage
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset toc
+LatexCommand tableofcontents
+
+\end_inset
+
+
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+thispagestyle{empty}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+setcounter{page}{1}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Introduction
+\end_layout
+
+\begin_layout Standard
+This document describes design process for PowerEnjoy project based on the
+ requirements described in the RASD.
+ It is divided into four sections, following
+\shape italic
+IEEE
+\shape default
+ standard:
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+Architecture Design
+\series default
+, which describes the structure of the system, highlighting software elements
+ and relations among them and their properties;
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+Data Design
+\series default
+, which describes the chosen data structures, dictated by attributes and
+ relationships among data objects;
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+Interface Design
+\series default
+, which describes either internal or external program interfaces;
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+Procedural Design
+\series default
+, which describes procedural details using graphical notations that facilitates
+ translation to code.
+\end_layout
+
+\begin_layout Subsection
+Purpose
+\end_layout
+
+\begin_layout Standard
+The purpose of this document, the Design Document, is to give more technical
+ details than the RASD about PowerEnjoy system.
+ In more detail, this document is addressed to software developers to let
+ them better understand what is to be built and how it is expected to be
+ done.
+ The main goal of this document is to completely describe the system-to-be
+ by detecting and describing the adopted architectural style, the high-level
+ components of the software-to-be and how these components are distributed
+ on the architecture's tiers and how they communicate and interact with
+ each other, according to the dictates and the guide-lines provided by the
+ RASD.
+\end_layout
+
+\begin_layout Subsection
+Scope
+\end_layout
+
+\begin_layout Standard
+The aim of this project is to develop a web/mobile application for PowerEnjoy,
+ in order to let any registered and active user to reserve a car nearby
+ and drive it in a simple and effective way.
+ Thanks to a smarter uniform distribution of cars in the city that maximizes
+ the probability to find a car nearby and to our competitive prices and
+ some special discount, every user will experience a totally new feeling
+ of freedom and will enjoy saving while driving.
+ No car parking ticket.
+ No refuelling.
+ No road tax.
+ No hidden costs.
+ PowerEnjoy will make it possible.
+\end_layout
+
+\begin_layout Subsection
+Definitions, Acronyms, Abbreviations
+\end_layout
+
+\begin_layout Standard
+Below there are definitions of some terms that will be used in the document,
+ in order to avoid any ambiguity in their use and their understanding.
+\end_layout
+
+\begin_layout Description
+API: Application Programming Interface; it is a common way to communicate
+ with another system.
+
+\end_layout
+
+\begin_layout Description
+DBMS: DataBase Management System, a software that control the creation,
+ maintenance and use of a database.
+ (e.g.
+ MySQL)
+\end_layout
+
+\begin_layout Description
+DD: Design Document.
+\end_layout
+
+\begin_layout Description
+EJB: Enterprise JavaBeans, a managed server-side component architecture
+ for modular construction of enterprise applications.
+\end_layout
+
+\begin_layout Description
+
+\shape italic
+EJB
+\begin_inset space ~
+\end_inset
+
+Container
+\shape default
+: a software that implements Sun EJB specifications in order to correctly
+ manage session and entity beans.
+\end_layout
+
+\begin_layout Description
+
+\shape italic
+Entity
+\begin_inset space ~
+\end_inset
+
+bean
+\shape default
+: a distributed object that have persistent state.
+\end_layout
+
+\begin_layout Description
+JavaBeans
+\begin_inset space ~
+\end_inset
+
+Components: Objects that act as temporary data stores for the pages of an
+ application.
+\end_layout
+
+\begin_layout Description
+JAX-RS: Java API for RESTful Web Services, a Java programming language API
+ specification that provides support in creating web services according
+ to the Representational State Transfer (REST) architectural pattern.
+\end_layout
+
+\begin_layout Description
+JDBC: Java Database Connectivity, a Java API that allows the application
+ to communicate with a database.open source database manager system, a software
+ capable of managing data.
+\end_layout
+
+\begin_layout Description
+JSF: JavaServer Faces, a Java specification for building component-based
+ user interfaces for web applications.
+\end_layout
+
+\begin_layout Description
+JSP
+\begin_inset space \space{}
+\end_inset
+
+Pages: text documents that contain two types of text: static data, which
+ can be expressed in any text-based format (such as HTML, SVG, WML, and
+ XML), and JSP elements, which construct dynamic content.
+\end_layout
+
+\begin_layout Description
+HTML: HyperText Markup Language, a markup language for building web pages.
+\end_layout
+
+\begin_layout Description
+HTTP: Hypertext Transfer Protocol, an application protocol used by web browsers.
+\end_layout
+
+\begin_layout Description
+MVC: Model View Controller.
+\end_layout
+
+\begin_layout Description
+MySQL: open source database manager system, a software capable of managing
+ data.
+\end_layout
+
+\begin_layout Description
+RASD: Requirements Analysis and Specifications Document.
+\end_layout
+
+\begin_layout Description
+
+\shape italic
+URL
+\shape default
+: Uniform Resource Locator.
+\end_layout
+
+\begin_layout Description
+
+\shape italic
+Push
+\begin_inset space \space{}
+\end_inset
+
+notification
+\shape default
+: it is a notification sent to a smartphone using the mobile application,
+ so it must be installed.
+\end_layout
+
+\begin_layout Description
+Push
+\begin_inset space \space{}
+\end_inset
+
+service: it is a service that allows to send push notifications with own
+ API.
+\end_layout
+
+\begin_layout Description
+REST: REpresantional State Transfer.
+\end_layout
+
+\begin_layout Description
+RESTful: REST with no session.
+\end_layout
+
+\begin_layout Description
+UX: User eXperience.
+\end_layout
+
+\begin_layout Description
+UI: User Interface.
+\end_layout
+
+\begin_layout Description
+BCE: Business Controller Entity.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Reference documents
+\end_layout
+
+\begin_layout Itemize
+Requirements Analysis and Specification Document produced before: [RASD.pdf]
+\end_layout
+
+\begin_layout Itemize
+Specification Document: [ASSIGNMENTS AA 2016-2017.pdf]
+\end_layout
+
+\begin_layout Subsection
+Document Structure
+\end_layout
+
+\begin_layout Enumerate
+
+\series bold
+Introduction
+\series default
+: this section introduces the design document.
+ It contains a justification of his utility and indications on which parts
+ are covered in this document that are not covered by RASD.
+\end_layout
+
+\begin_layout Enumerate
+
+\series bold
+Architecture Design
+\series default
+: this section is divided into different parts.
+\end_layout
+
+\begin_deeper
+\begin_layout Itemize
+
+\shape italic
+Overview
+\shape default
+: this sections explains the division in tiers of our application.
+\end_layout
+
+\begin_layout Itemize
+
+\shape italic
+High level components and their interaction
+\shape default
+: this sections gives a global view of the components of the application
+ and how they communicate.
+\end_layout
+
+\begin_layout Itemize
+
+\shape italic
+Component view
+\shape default
+: this sections gives a more detailed view of the components of the applications.
+\end_layout
+
+\begin_layout Itemize
+
+\shape italic
+Deploying view
+\shape default
+: this section shows the components that must be deployed to have the applicatio
+n running correctly.
+\end_layout
+
+\begin_layout Itemize
+
+\shape italic
+Runtime view
+\shape default
+: this section shows the course of the different tasks of our application
+ through several sequence diagrams .
+\end_layout
+
+\begin_layout Itemize
+
+\shape italic
+Component interfaces
+\shape default
+: this section shows the interfaces between the components.
+\end_layout
+
+\begin_layout Itemize
+
+\shape italic
+Selected architectural styles and patterns
+\shape default
+: this section explain the architectural choices taken during the creation
+ of the application.
+\end_layout
+
+\begin_layout Itemize
+
+\shape italic
+Other design decisions
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+
+\series bold
+Algorithms Design
+\series default
+: this section describes the most critical parts via some algorithms.
+ Pseudo code is used in order to hide unnecessary implementation details
+ in order to focus on the most important parts.
+\end_layout
+
+\begin_layout Enumerate
+
+\series bold
+User Interface Design
+\series default
+: this section presents mockups and user experience explained via UX and
+ BCE diagrams.
+\end_layout
+
+\begin_layout Enumerate
+
+\series bold
+Requirements Traceability
+\series default
+: this section aims to explain how the decisions taken in the RASD are linked
+ to design elements.
+\end_layout
+
+\begin_layout Enumerate
+
+\series bold
+Appendix
+\series default
+: in this section will be listed the different tools we used and the hours
+ of work spent by each member of the team.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Architectural Design
+\end_layout
+
+\begin_layout Subsection
+Overview
+\end_layout
+
+\begin_layout Standard
+The PowerEnjoy system will be developed on the Java 2 Enterprise Edition
+ platform, one of the most important technology used to build large scale,
+ distributed, component-based, web-enabled and multi-tier applications.
+ J2EE provides also robustness, efficiency and
+\shape italic
+portability
+\shape default
+ of code because it is based on Java technology and standard-based Java
+ programming APIs: in this way, we will be able to “write once” our application
+ and “run it anywhere”.
+ The system will be designed according to the traditional multi-tier architectur
+e, in order to guarantee:
+\end_layout
+
+\begin_layout Itemize
+
+\shape italic
+flexibility
+\shape default
+: by separating the business logic of an application from its presentation
+ logic, a multi-tier architecture makes the application much more flexible
+ to changes;
+\end_layout
+
+\begin_layout Itemize
+
+\shape italic
+maintainability
+\shape default
+: because of their independence and the different technology used in each
+ layer, changes should have no effect on any other layer and can be managed
+ by independent teams with different skills.
+\end_layout
+
+\begin_layout Itemize
+
+\shape italic
+reusability
+\shape default
+: separating the application into multiple layers makes it easier to implement
+ re-usable components.
+\end_layout
+
+\begin_layout Itemize
+
+\shape italic
+scalability
+\shape default
+: a multi-tier architecture allows distribution of application components
+ across multiple servers thus making the system much more scalable
+\end_layout
+
+\begin_layout Standard
+In detail, PowerEnjoy architecture will be made up of four logical levels:
+ the
+\series bold
+Client
+\series default
+ tier, the
+\series bold
+Web
+\series default
+ tier, the
+\series bold
+Business
+\series default
+ tier and the
+\series bold
+EIS
+\series default
+ tier.
+\end_layout
+
+\begin_layout Itemize
+The
+\series bold
+Client
+\series default
+ tier consists of application clients that make
+\shape italic
+requests
+\shape default
+ to the server, which processes the requests and returns a
+\shape italic
+response
+\shape default
+ back to the client.
+ The Client tier is accessible via
+\shape italic
+mobile application
+\shape default
+ (that interacts directly with the application server via RESTful API) or
+ by a
+\shape italic
+web browser
+\shape default
+ (that run JavaScript and apply Cascading Style Sheets (CSS) before interpreting
+ pages marked up with HTML), and it interacts with the Web tier through
+ an HTTP connection, eventually sending data provided by the user.
+\end_layout
+
+\begin_layout Itemize
+The
+\series bold
+Web
+\series default
+ tier consists of components implemented with JEE technology that handle
+ the interaction between clients and the business tier.
+ Its main tasks are collect HTTP requests from users of the client interface
+ and return appropriate anwers with HTML pages, generated with the data
+ received from the components in the business tier.
+
+\end_layout
+
+\begin_layout Itemize
+The
+\series bold
+Business
+\series default
+ tier consists of Enterprise JavaBean (EJB), software components that encapsulat
+e all the logic of an application.
+ This tier uses the Java Persistence API (JPA) to access the database, abstracti
+ng the relational model implemented by the database in a model of data objects,
+ in order to allow the interaction with the application.
+\end_layout
+
+\begin_layout Itemize
+The
+\series bold
+EIS
+\series default
+ tier consists of a Database Management System (DBMS) in charge of create,
+ manipulate, query and extract data over a database.
+ The business tier uses the Java Database Connectivity (JDBC) to have access
+ to the resources located on the database.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/MultiTier Architecture.png
+ width 85text%
+ height 85theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+MultiTier Architecture
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Newpage newpage
+\end_inset
+
+
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/HardwareRepresentation.png
+ width 100text%
+ height 100theight%
+ keepAspectRatio
+ scaleBeforeRotation
+ rotateAngle 90
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Hardware Representation
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+High level components and their interaction
+\end_layout
+
+\begin_layout Standard
+The high level components architecture is composed of different elements.
+ The client can initiate the communication with the server from his mobile
+ application or from the webpage of the application.
+ This communication is made in a synchronous way since the client, who initiates
+ the communication, has to wait the answer of the application that acknowledge
+ him that his request has been taken into account.
+ The application will receive two kinds of requests from the client: direct
+ ones, if he's using the mobile application, or redirected ones by the webserver
+, if he's using the web browser.
+ The application will later send an asynchronous message to the client to
+ specifiy the status of his reservation.
+ The application communicates also with another type of component, the cars.
+ The application can send synchronous messages to the cars to check their
+ status and eventually reserve one of them for each user or manage any kind
+ of maintenance.
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace medskip
+\end_inset
+
+The interactions between the main components are shown in figure:
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/HighLevel Components.png
+ width 100text%
+ height 100theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+High Level Components
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Component view
+\end_layout
+
+\begin_layout Standard
+We adopted a
+\shape italic
+top-down
+\shape default
+ approach to separate, at least from a logical point of view, different
+ set of functionalities.
+ Once the system was decomposed into several sub-systems, we adopted a
+\shape italic
+bottom-up
+\shape default
+ approach in order to create more modular and reusable components.
+ Here are listed the most relevant components the system has been split
+ into.
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+PowerEnjoyApp GUI
+\series default
+: this is the graphic interface which let the user send request to the server
+ and receive response via mobile application;
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+PowerEnjoyWeb GUI
+\series default
+: this is the graphic interface which let the user send request to the server
+ and receive response via web browser;
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+Authentication Manager
+\series default
+: this is the component responsible for the customer registration and login
+ system.
+ It handles activities such as creating a new customer account, log into
+ the system or deleting an existing account;
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+AccountInformation Manager
+\series default
+: this is the component responsible for the customer profile management.
+ It handles activities such as editing personal and billing data, enabling/disab
+ling money saving option and consulting reservation history;
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+CheckAvailability Manager
+\series default
+, this is the component responsible for searching available cars in a specific
+ location;
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+Reservation Manager
+\series default
+: this is the component that manages each reservation.
+ It handles activities such as creating a new reservation, checking the
+ active reservation information (such as the remaining time until it expires,
+ the reserved car's position and status or the elapsed rental time) and
+ terminating the active ones;
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+Car Manager
+\series default
+: this is the component that check and manage the status of each car by
+ communicating with them through the ADS of each present on each car.
+ If a car needs any kind of maintenance, it will send a request to an external
+ maintenance service;
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+ADS_Application Manager
+\series default
+: this is the component which guarantee the correct communication between
+ the Server and the ADS Application installed on each ADS on each electric
+ car;
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+Payment Manager
+\series default
+: this is the component that calculates the fees for the rides at the end
+ of each reservation and send a payment request to an external service;
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+Data Manager
+\series default
+: this is the component where the data is managed and viewed;
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+Notification Manager
+\series default
+: this is the component that manages all the notifications.
+\end_layout
+
+\begin_layout Standard
+Our application will use Google Maps API to manage information about the
+ actors' position.
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace medskip
+\end_inset
+
+The interactions between the main components are shown in figure:
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/ComponentView.png
+ width 100text%
+ height 100theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Component View
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace smallskip
+\end_inset
+
+In this representation, in order to avoid redundancy due a duplication of
+ the same elements, we decide to use a different color for the actors to
+ enlight the fact that only an active user can have the possibility to reserve
+ a car.
+\end_layout
+
+\begin_layout Subsection
+Deployment view
+\end_layout
+
+\begin_layout Standard
+In this section in shown how the software components are distributed with
+ respect to the hardware resources available in the system.
+ The mobile applications communicate directly with application server via
+ RESTful API while the browser applications communicate with the Web server
+ that receives users' requests, interacts with the Business server and provides
+ HTML pages in order to start the user experience.
+ The system can retrieve information from each car communicating with their
+ ADS via RESTful API.
+ The Business server contains the application logic and the modules that
+ handle the main functionalities of the system.
+ Every module is accessible only by the allowed users.
+ All the data needed for the operations handled by the modules are retrieved
+ from the database in the Data server.
+ The various interactions with the database are monitored by the DBMS in
+ order to guarantee the ACID properties of the database.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/DeploymentView.png
+ width 76text%
+ height 80theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Deployment View
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Runtime view
+\end_layout
+
+\begin_layout Standard
+In this section are explained through Sequence diagrams some of the most
+ relevant interactions between components and actors of the system.
+ Like in the RASD document, some assumptions are made in order to simplify
+ the representation and clarify some aspects; by the way, some of the most
+ important features, if considered implicit in a Sequence diagram, are explicitl
+y represented in another one.
+\end_layout
+
+\begin_layout Subsubsection*
+Login Sequence Diagram
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/Sequence Diagrams/login.png
+ width 100text%
+ height 100theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Login Sequence Diagram
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset VSpace medskip
+\end_inset
+
+
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection*
+Registration Sequence Diagram
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/Sequence Diagrams/registration.png
+ width 100text%
+ height 100theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Registration Sequence Diagram
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset VSpace medskip
+\end_inset
+
+
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection*
+Check Cars' Availability Sequence Diagram
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/Sequence Diagrams/availability.png
+ width 100text%
+ height 100theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Check Cars’ Availability Sequence Diagram
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset VSpace medskip
+\end_inset
+
+
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection*
+Modify Personal Information Sequence Diagram
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/Sequence Diagrams/editpersonalinfo.png
+ width 100text%
+ height 100theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Modify Personal Information Sequence Diagram
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset VSpace medskip
+\end_inset
+
+
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection*
+Car Reservation Sequence Diagram
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/Sequence Diagrams/reservecar.png
+ width 100text%
+ height 100theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Car Reservation Sequence Diagram
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset VSpace medskip
+\end_inset
+
+
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection*
+Car Unlock Sequence Diagram
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/Sequence Diagrams/opencar.png
+ width 100text%
+ height 100theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Car Unlock Sequence Diagram
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset VSpace medskip
+\end_inset
+
+
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection*
+Car Rental Sequence Diagram
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/Sequence Diagrams/rental.png
+ width 100text%
+ height 100theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Car Rental Sequence Diagram
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset VSpace medskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Component interfaces
+\end_layout
+
+\begin_layout Standard
+In this section we're going to describe the interfaces through which the
+ various components of the system communicate.
+ For each interface we'll provide a short but exhaustive description of
+ the main exposed methods.
+\end_layout
+
+\begin_layout Subsubsection*
+
+\series bold
+Authentication Manager
+\end_layout
+
+\begin_layout Standard
+Functions implemented by
+\series bold
+Authentication Manager
+\series default
+:
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{register}
+\end_layout
+
+\end_inset
+
+: This function creates a new entity
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{user}
+\end_layout
+
+\end_inset
+
+ in the system with all the information provided by the user.
+ If the entered data are correct, an email is sent to the user address to
+ confirm the correct registration to the service.
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{login}
+\end_layout
+
+\end_inset
+
+: This function allows any registered user to log into the system using
+ his username and password.
+ If the credentials are correct, the function returns a token to be used
+ in the future requests to identify the user.
+ Otherwise, an error is returned.
+\end_layout
+
+\begin_layout Subsubsection*
+
+\series bold
+AccountInformation Manager
+\end_layout
+
+\begin_layout Standard
+Functions implemented by
+\series bold
+AccountInformation Manager
+\series default
+:
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{edit
+\backslash
+_profile}
+\end_layout
+
+\end_inset
+
+: This function allows registered users to edit their profile information.
+
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{enable
+\backslash
+_mso}
+\end_layout
+
+\end_inset
+
+: This function allows registered users to enable the money saving option.
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{disable
+\backslash
+_mso}
+\end_layout
+
+\end_inset
+
+: This function allows registered users to disable the money saving option.
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{consult
+\backslash
+_history}
+\end_layout
+
+\end_inset
+
+: This function allows registered users to consult their reservation history.
+\end_layout
+
+\begin_layout Subsubsection*
+
+\series bold
+CheckAvailability Manager
+\end_layout
+
+\begin_layout Standard
+Functions implemented by
+\series bold
+CheckAvailability Manager
+\series default
+:
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{check
+\backslash
+_user
+\backslash
+_position}
+\end_layout
+
+\end_inset
+
+: This function will retrieve the information about the user's position
+ through the Google Maps API.
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{check
+\backslash
+_availability}
+\end_layout
+
+\end_inset
+
+: This function will send a request to the Car Manager in order to retrieve
+ all the information about the cars' location and status nearby the current
+ user.
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{show
+\backslash
+_map}
+\end_layout
+
+\end_inset
+
+: This function will first call the other function written above and then
+ will send the information retrieved back to the user, showing him on a
+ map his position and the location of the available cars very near to him.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection*
+
+\series bold
+Reservation Manager
+\end_layout
+
+\begin_layout Standard
+Functions implemented by
+\series bold
+Reservation Manager
+\series default
+:
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{check
+\backslash
+_user
+\backslash
+_position}
+\end_layout
+
+\end_inset
+
+: This function will retrieve the information about the user's position
+ through the Google Maps API.
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{check
+\backslash
+_reservability}
+\end_layout
+
+\end_inset
+
+: This function will send a request to the Car Manager in order to check
+ if the current user can effectively reserve the selected car.
+
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{check
+\backslash
+_terminabiity}
+\end_layout
+
+\end_inset
+
+: This function will send a request to the Car Manager in order to check
+ if the current user can effectively terminate the active reservation or
+ rent.
+
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{start
+\backslash
+_reservation}
+\end_layout
+
+\end_inset
+
+: This function create a new istance of
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{reservation}
+\end_layout
+
+\end_inset
+
+.
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{end
+\backslash
+_reservation}
+\end_layout
+
+\end_inset
+
+: This function will first
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{check
+\backslash
+_terminabiity}
+\end_layout
+
+\end_inset
+
+ of the active reservation and only after receiving an affirmative response
+ back it will end the current istance of
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{reservation}
+\end_layout
+
+\end_inset
+
+.
+ It will also call
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{check
+\backslash
+_reservation
+\backslash
+_status}
+\end_layout
+
+\end_inset
+
+ and it will send a request to the Payment Manager with these last information
+ retrieved.
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{start
+\backslash
+_rent}
+\end_layout
+
+\end_inset
+
+: This function create a new istance of
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{rent}
+\end_layout
+
+\end_inset
+
+.
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{end
+\backslash
+_rent}
+\end_layout
+
+\end_inset
+
+: This function will first
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{check
+\backslash
+_terminabiity}
+\end_layout
+
+\end_inset
+
+ of the active rent and only after receiving an affirmative response back
+ it will end the current istance of
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{rent}
+\end_layout
+
+\end_inset
+
+.
+ It will also call
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{check
+\backslash
+_rent
+\backslash
+_status}
+\end_layout
+
+\end_inset
+
+ and it will send a request to the Payment Manager with these last information
+ retrieved.
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{check
+\backslash
+_reservation
+\backslash
+_status}
+\end_layout
+
+\end_inset
+
+: This function will retrieve all the information about the
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{reservation}
+\end_layout
+
+\end_inset
+
+ and it will send them back to the user.
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{check
+\backslash
+_rent
+\backslash
+_status}
+\end_layout
+
+\end_inset
+
+: This function will retrieve all the information about the
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{rent}
+\end_layout
+
+\end_inset
+
+ and it will send them back to the user.
+\end_layout
+
+\begin_layout Subsubsection*
+
+\series bold
+Car Manager
+\end_layout
+
+\begin_layout Standard
+Functions implemented by
+\series bold
+Car Manager
+\series default
+:
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{request
+\backslash
+_information}
+\end_layout
+
+\end_inset
+
+: This function will send a request to the ADS_Application Manager in order
+ to retrieve a complete report about a car or just information about the
+ position and the status of a car.
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{check
+\backslash
+_reservability}
+\end_layout
+
+\end_inset
+
+: This function will first retrieve more information about the car recevied
+ as input from the Reservation Manager and then will compare its location
+ with the user's position.
+ It will send back a
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{confirmation}
+\end_layout
+
+\end_inset
+
+ only if the distance between the two entities is suitable and if the status
+ of the selected car is still
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{available}
+\end_layout
+
+\end_inset
+
+.
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{check
+\backslash
+_availability}
+\end_layout
+
+\end_inset
+
+: This function will first check the user's position and then will send
+ a request to the ADS_Application Manager in order to retrieve status and
+ position of all the cars stored in the DataBase.
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{check
+\backslash
+_terminability}
+\end_layout
+
+\end_inset
+
+: This function will first
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{request
+\backslash
+_information}
+\end_layout
+
+\end_inset
+
+ and then will check if all the conditions to end the reservation or the
+ rent are respected (for example if nobody is still in the car, and so on..).
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{contact
+\backslash
+_maintanance
+\backslash
+_service}
+\end_layout
+
+\end_inset
+
+: Every time the Car Manager retrieve information about a car's status,
+ if necessary, it will send a request of maintanance to an external maintanance
+ service through this function.
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{perform
+\backslash
+_action}
+\end_layout
+
+\end_inset
+
+: This function will send a request to the ADS_Application of a defined
+ car in order to perform a precise action.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection*
+
+\series bold
+ADS_Application Manager
+\end_layout
+
+\begin_layout Standard
+Functions implemented by
+\series bold
+ADS_Application Manager
+\series default
+:
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{check
+\backslash
+_status}
+\end_layout
+
+\end_inset
+
+: This function asks the ADS to check the current status (
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{available, reserved, in
+\backslash
+_use, unavailable}
+\end_layout
+
+\end_inset
+
+) of the car.
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{check
+\backslash
+_damages}
+\end_layout
+
+\end_inset
+
+: This function asks 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
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{unavailable}
+\end_layout
+
+\end_inset
+
+ and will notify it immedetiately to the Server application.
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{check
+\backslash
+_position}
+\end_layout
+
+\end_inset
+
+: This function asks the ADS to check the car's position.
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{check
+\backslash
+_passengers}
+\end_layout
+
+\end_inset
+
+: This function asks the ADS the number of passengers actually inside the
+ car.
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{check
+\backslash
+_power
+\backslash
+_grid}
+\end_layout
+
+\end_inset
+
+: This function asks the ADS to check if the car is plugged into the power
+ grid.
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{send
+\backslash
+_status
+\backslash
+_and
+\backslash
+_position}
+\end_layout
+
+\end_inset
+
+: This function asks the ADS to check status and position of a car and to
+ send these information back to the Server application.
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{send
+\backslash
+_report}
+\end_layout
+
+\end_inset
+
+: This function asks the ADS to perform all the actions written above (that
+ is check status, position, eventual damages and the number of eventual
+ passengers inside the car) and to send these information back to the Server
+ application.
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{lock
+\backslash
+_doors}
+\end_layout
+
+\end_inset
+
+: This function asks the ADS the lock the car's doors and to change the
+ status of the car into
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{in
+\backslash
+_use}
+\end_layout
+
+\end_inset
+
+.
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{unlock
+\backslash
+_doors}
+\end_layout
+
+\end_inset
+
+: This function asks the ADS the unlock the car's doors and to change the
+ status of the car into
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{available}
+\end_layout
+
+\end_inset
+
+.
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{start
+\backslash
+_reservation}
+\end_layout
+
+\end_inset
+
+: This function asks the ADS the change the car's status into
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{reserved}
+\end_layout
+
+\end_inset
+
+.
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{end
+\backslash
+_reservation}
+\end_layout
+
+\end_inset
+
+: This function asks the ADS the change the car's status into
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{available}
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Subsubsection*
+
+\series bold
+Payment Manager
+\end_layout
+
+\begin_layout Standard
+Functions implemented by
+\series bold
+Payment Manager
+\series default
+:
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{calculate
+\backslash
+_fees}
+\end_layout
+
+\end_inset
+
+: This function will use all the information retrieved as input about the
+
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{reservation}
+\end_layout
+
+\end_inset
+
+ or about the
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{rent}
+\end_layout
+
+\end_inset
+
+ to calculate the total fees, and then will call
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{contact
+\backslash
+_payment
+\backslash
+_service}
+\end_layout
+
+\end_inset
+
+.
+
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{contact
+\backslash
+_payment
+\backslash
+_service}
+\end_layout
+
+\end_inset
+
+: This function send a request of payment to the external payment service.
+\end_layout
+
+\begin_layout Subsubsection*
+
+\series bold
+Data Manager
+\end_layout
+
+\begin_layout Standard
+Functions implemented by
+\series bold
+Data Manager
+\series default
+:
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{store
+\backslash
+_data}
+\end_layout
+
+\end_inset
+
+: This function allows any authorized entity to store data into the DataBase.
+
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{retrieve
+\backslash
+_data}
+\end_layout
+
+\end_inset
+
+: This function allows any authorized entity to read data from the DataBase.
+
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{delete
+\backslash
+_data}
+\end_layout
+
+\end_inset
+
+: This function allows any authorized entity to delete data from the DataBase.
+
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{modify
+\backslash
+_data}
+\end_layout
+
+\end_inset
+
+: This function allows any authorized entity to modify data into the DataBase.
+
+\end_layout
+
+\begin_layout Subsubsection*
+
+\series bold
+Notification Manager
+\end_layout
+
+\begin_layout Standard
+Functions implemented by
+\series bold
+Notification Manager
+\series default
+:
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{notify}
+\end_layout
+
+\end_inset
+
+: This function is used by all the authorized entities to communicate between
+ each other.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection*
+
+\series bold
+Other Specifications
+\end_layout
+
+\begin_layout Itemize
+The front-ends of the system (the mobile app and the web application) communicat
+e with the Application Server using the back-end interface implemented as
+ a RESTful interface over the HTTPS protocol.
+\end_layout
+
+\begin_layout Itemize
+The users’ browsers will communicate with the web server via HTTPS requests.
+ Any unencrypted request will be denied.
+\end_layout
+
+\begin_layout Itemize
+The RESTful interface is implemented in the Application server using JAX-RS
+ and uses XML as the data representation language.
+\end_layout
+
+\begin_layout Itemize
+The Application Server communicates with the DBMS via the Java Persistence
+ API over standard network protocols.
+\end_layout
+
+\begin_layout Itemize
+The Application Server is configurable by means of a XML configuration file,
+ that will contain any other setting useful in the implementation phase.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Selected architectural styles and patterns
+\end_layout
+
+\begin_layout Subsubsection
+The Architecture
+\end_layout
+
+\begin_layout Standard
+The architecture of the system has been previously described at higher level.
+\end_layout
+
+\begin_layout Standard
+As we said, we adopted a
+\series bold
+multi-tier architecture
+\series default
+ in which every tier is hosted on a different machine: the
+\shape italic
+Client
+\shape default
+ tier is on the pc or smartphone the user access the system from, the
+\shape italic
+Web
+\shape default
+ tier is hosted on a separate server used only for this purpose, while another
+ server hosts the
+\shape italic
+Business
+\shape default
+ tier.
+ Finally a last server contains the
+\shape italic
+Data
+\shape default
+ tier.
+\end_layout
+
+\begin_layout Standard
+This division between all levels has been made in order to allow update
+ and maintenance on a particular tier without affecting the others, and
+ to prevent the whole system to interrupt in case of fault of a component.
+ We also adopted the
+\shape italic
+thin client
+\shape default
+ paradigm to the interaction between user’s machine and the system: in this
+ way all the application logic is on the application server, which has sufficien
+t computing power and is able to manage concurrency issue efficiently.
+\end_layout
+
+\begin_layout Subsubsection
+The Desing Pattern
+\end_layout
+
+\begin_layout Standard
+The Design pattern used for this system is the
+\series bold
+Model-View-Controller
+\series default
+ (MVC).
+\end_layout
+
+\begin_layout Standard
+This choice has been made mainly for the flexibility that this pattern provides:
+ the
+\shape italic
+model
+\shape default
+, the
+\shape italic
+view
+\shape default
+ and the
+\shape italic
+controller
+\shape default
+ are separated into different components that can be modified with a minimum
+ impact with respect to the others, helping to achieve a better scalability
+ and offering the possibility to add new functionalities to the system or
+ to apply changes to the code.
+ In more detail:
+\end_layout
+
+\begin_layout Itemize
+The
+\series bold
+Model
+\series default
+ contains the representation of data and the application logic, so all the
+ functions that manipulates data.
+\end_layout
+
+\begin_layout Itemize
+The
+\series bold
+View
+\series default
+ makes the model suitable for the user interaction, providing a GUI: every
+ user will access the system and all its functionalities through this component.
+ Furthermore, it provides the possibility to have different representations
+ (or views) for the same data, depending on the user’s preference or on
+ the user’s permissions.
+\end_layout
+
+\begin_layout Itemize
+The
+\series bold
+Controller
+\series default
+, finally, is responsible for the communication between the View and the
+ Model: in particular it responds to user’s actions and invokes changes
+ on the model.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Other design decisions
+\end_layout
+
+\begin_layout Subsubsection
+Storage of passwords
+\end_layout
+
+\begin_layout Standard
+Users’ password will not be stored in plain-text, but they will be hashed
+ and salted with cryptographic hash functions.
+ This provides a last line of defense in case of data theft.
+\end_layout
+
+\begin_layout Subsubsection
+Google Maps
+\end_layout
+
+\begin_layout Standard
+The system uses an external service, Google Maps, to offload all the geolocaliza
+tion, distance calculation and map visualization processes.
+ The reasons of this choice are the following:
+\end_layout
+
+\begin_layout Itemize
+manually developing maps for each city is not a viable solution due to the
+ tremendous effort of coding and data collection required;
+\end_layout
+
+\begin_layout Itemize
+Google Maps is a well-established, tested and reliable software component
+ already used by millions of people around the world;
+\end_layout
+
+\begin_layout Itemize
+Google Maps offers APIs, enabling programmatic access to its features;
+\end_layout
+
+\begin_layout Itemize
+Google Maps can be used both on the server side (calculation, shortest paths,
+ traffic, incident reporting) and on the client side (map visualization);
+\end_layout
+
+\begin_layout Itemize
+the users feel comfortable with a software component they know and use everyday.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Algorithm Design
+\end_layout
+
+\begin_layout Standard
+In this section we will focus mostly on two important themes: the calculus
+ of the reservations’ and rents’ fees and the uniform redistribution of
+ the cars.
+ It is very important to implement the former in a dynamic and easy-to-change
+ way because of the continuously changing business strategies and it is
+ fundamental to give a lot of attention to the latter because it would considera
+bly increase the quality of the service and incentivize the virtuous behaviours
+ of the user, according to the core values of PowerEnjoy.
+\end_layout
+
+\begin_layout Subsection
+The uniform distribution of cars
+\end_layout
+
+\begin_layout Standard
+Let’s start from the attempt to redistribute in a uniform way the cars into
+ each city.
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The first kind of solution we will propose is valid from a theoretical point
+ of view, but it is not so suitable to our service.
+ We will explain it anyway to give a deep and better understanding of the
+ problem and of our reasoning.
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+To guarantee an effectively uniform distribution of the cars, we would act
+ in this way:
+\end_layout
+
+\begin_layout Enumerate
+For each point (intended as a couple of two values:
+\series bold
+latitude
+\series default
+ and
+\series bold
+longitude
+\series default
+) inside the city (intended as a
+\shape italic
+closed ensemble of points
+\shape default
+), we would calculate the minimum distance with the first available car
+ found.
+\end_layout
+
+\begin_layout Enumerate
+Among these minimum distances, we would take in account the greatest one
+ and we would put a new available car in that exact point.
+\end_layout
+
+\begin_layout Standard
+By iterating these two steps, we would guarantee an uniform distribution
+ of cars, starting from a 2-dimensional space (the city) already filled
+ in part with other cars, unmovable.
+\begin_inset VSpace medskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+However this solution is not a feasible one because it would be necessary
+ to use an ingent calculus power to effectively substain a similar amount
+ of operations.
+ Perhaps it would be possible to achieve the same result with a smaller
+ quantity of points (taken randomly or in a less accurate way) or in the
+ opposite way: we could calculate the maximum distant point from each available
+ car inside the city, and decide to address the user there.
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+However this theoretical solution won’t take in account two important facts:
+\end_layout
+
+\begin_layout Enumerate
+the first one is that we cannot address the user into a specific point (intended
+ as above, a couple of
+\shape italic
+latitude
+\shape default
+ and
+\shape italic
+longitude
+\shape default
+) but we have to address him/her into a recharging station
+\shape italic
+near
+\shape default
+ the point, so we will be able anyway only to achieve an
+\shape italic
+approximately
+\shape default
+ uniform distribution of cars.
+\end_layout
+
+\begin_layout Enumerate
+the second one is that the user will never revolutionize his destination,
+ so we have to address him into a point not so
+\shape italic
+far
+\shape default
+ from his final destination.
+
+\end_layout
+
+\begin_layout Standard
+So we abandoned the utopia of a
+\shape italic
+perfect
+\shape default
+ uniform distribution of cars, and we focused mainly on the distribution
+ of the car taking in account the PowerEnjoy power grid stations.
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace smallskip
+\end_inset
+
+We first ranked them according to the
+\shape italic
+utility function
+\shape default
+ of the user, in agreement with the point of view of some experts: let’s
+ take in account Milan, the first city in which we offered our service.
+ As showed in figure, we ranked the main zones of Milan giving them a number
+ from 1 to 6, according to the attractivness of that place for our clients.
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/milan.png
+ width 100text%
+ height 100theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Ranking of the Power Grid Stations in Milan
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Then we defined a customized radius of 500 - 1000 meters for each power
+ grid station and we covered the whole map of Milan by drawing one circumference
+ for each one of them, according to their given radius, as showed in figure.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/milan2.png
+ width 100text%
+ height 100theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Radius of the Power Grid Stations in Milan
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+In this way, when a user with the enabled
+\series bold
+Money Saving Option
+\series default
+ would input his/her final destination at the beginning of a rent, the system
+ would select a special parking area among all the ones present in the city
+ by following these steps:
+\end_layout
+
+\begin_layout Enumerate
+The system will retrieve the latitude and longitude of the final destination
+ of the user;
+\end_layout
+
+\begin_layout Enumerate
+The system will list all the circumferences (with the relative power grid
+ station) that contains that specific point;
+\end_layout
+
+\begin_layout Enumerate
+If there is only one station (distant in the worst case more or less 500-1000
+ meters from the final destination of the user), the system will select
+ it and will provide information about it to the user;
+\end_layout
+
+\begin_layout Enumerate
+If there isn’t any station with free power plugs, a message of error will
+ be showed to the user;
+\end_layout
+
+\begin_layout Enumerate
+If there is more than one station that contains that specific point, the
+ system will select the one with the maximum score according to this formula:
+\begin_inset Formula
+\[
+score=freeSlot*[(ranking-2)+(10-distance/100)*2]
+\]
+
+\end_inset
+
+where:
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+freeSlot
+\series default
+ is the number of available power plugs;
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+ranking
+\series default
+ is the number from 1 to 6 assigned to the zone in which is contained the
+ selected power grid station;
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+distance
+\series default
+ is the quantity of meters that separates the final destination of the user
+ from the selected power grid station.
+\end_layout
+
+\begin_layout Enumerate
+Example n°1:
+\end_layout
+
+\begin_deeper
+\begin_layout Standard
+The final destination of the user is in piazza delle Meraviglie, 34.
+ At this address correspond the point with latitude x and longitude y, and
+ there are 4 power grid stations that contain it.
+ The power grid stations are characterized by the following information:
+\end_layout
+
+\begin_layout Enumerate
+4 freeSlot, ranking 3, distance from the final destination of the user 500m;
+\end_layout
+
+\begin_layout Enumerate
+3 freeSlot, ranking 4, distance from the final destination of the user 350m;
+\end_layout
+
+\begin_layout Enumerate
+1 freeSlot, ranking 5, distance from the final destination of the user 650m;
+\end_layout
+
+\begin_layout Enumerate
+2 freeSlot, ranking 3, distance from the final destination of the user 250m;
+\end_layout
+
+\begin_layout Standard
+By applying the formula written above, we would obtain the following score:
+\end_layout
+
+\begin_layout Enumerate
+44
+\end_layout
+
+\begin_layout Enumerate
+45
+\end_layout
+
+\begin_layout Enumerate
+10
+\end_layout
+
+\begin_layout Enumerate
+32
+\end_layout
+
+\begin_layout Standard
+The system will select the power grid station n°2 and it will provide informatio
+n to the user about to get there.
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+Example n°2:
+\end_layout
+
+\begin_deeper
+\begin_layout Standard
+The final destination of the user is in piazza Trifoglio, 12.
+ At this address correspond the point with latitude z and longitude w, and
+ there are 2 power grid stations that contain it.
+ The power grid stations are characterized by the following information:
+\end_layout
+
+\begin_layout Enumerate
+0 freeSlot, ranking 5, distance from the final destination of the user 100m;
+\end_layout
+
+\begin_layout Enumerate
+2 freeSlot, ranking 4, distance from the final destination of the user 450m;
+\end_layout
+
+\begin_layout Standard
+By applying the formula written above, we would obtain the following score:
+\end_layout
+
+\begin_layout Enumerate
+0
+\end_layout
+
+\begin_layout Enumerate
+26
+\end_layout
+
+\begin_layout Standard
+The system will select the power grid station n°2 and it will provide informatio
+n to the user about to get there.
+\end_layout
+
+\end_deeper
+\begin_layout Standard
+\begin_inset VSpace medskip
+\end_inset
+
+In this way we would achieve our goal to distribute cars in the smartest
+ way we were able to think about.
+\end_layout
+
+\begin_layout Subsection
+How to calculate the Reservation fees
+\end_layout
+
+\begin_layout Standard
+In this section we will analyze the structure of the code that will handle
+ the payment for the reservation fees.
+\end_layout
+
+\begin_layout Subparagraph*
+calculateReservationFees(Reservation)
+\end_layout
+
+\begin_layout Standard
+\SpecialChar ligaturebreak
+
+\begin_inset space ~
+\end_inset
+
+
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{lstlisting}
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\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
+ 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
+ this amount of money.
+\end_layout
+
+\begin_layout Plain Layout
+
+*/
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+function calculateReservationFees (Reservation res){
+\end_layout
+
+\begin_layout Plain Layout
+
+ if (res.isExpired()){
+\end_layout
+
+\begin_layout Plain Layout
+
+ // This function will return a 'true' value if the reservation is expired
+ because of the time.
+\end_layout
+
+\begin_layout Plain Layout
+
+ paymentHandler(res.User, res.expirationFee);
+\end_layout
+
+\begin_layout Plain Layout
+
+ // This function will send a request of payment to the external payment
+ service with as input the ID of the user and the amount of money.
+\end_layout
+
+\begin_layout Plain Layout
+
+ }
+\end_layout
+
+\begin_layout Plain Layout
+
+ else {
+\end_layout
+
+\begin_layout Plain Layout
+
+ paymentHandler(res.User, 0);
+\end_layout
+
+\begin_layout Plain Layout
+
+ // This case covers both the cases in which the user decides to terminate
+ the reservation and in which he unlocks the car's doors.
+\end_layout
+
+\begin_layout Plain Layout
+
+ }
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{lstlisting}
+\end_layout
+
+\end_inset
+
+
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+How to calculate the Rent fees
+\end_layout
+
+\begin_layout Standard
+In this section we will analyze the structure of the code that will handle
+ the payment for the reservation fees.
+\end_layout
+
+\begin_layout Subparagraph*
+calculateRentDiscount(Rent, float)
+\end_layout
+
+\begin_layout Standard
+\SpecialChar ligaturebreak
+
+\begin_inset space ~
+\end_inset
+
+
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{lstlisting}
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+/* This function will calculate the eventual discount for each rent entity.
+ */
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+float function calculateRentDiscount(Rent ren, float totalCost){
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+ if (ren.atLeastTwoPassengers()){
+\end_layout
+
+\begin_layout Plain Layout
+
+ // This function will return a 'true' value if almost two passengers
+ were in the car.
+\end_layout
+
+\begin_layout Plain Layout
+
+ actualCost = actualCost * 0.9;
+\end_layout
+
+\begin_layout Plain Layout
+
+ // In this way we will apply a 10% of discount to the client.
+\end_layout
+
+\begin_layout Plain Layout
+
+ }
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+ if (ren.report.batteryLevelAtTheEndOfRent >= 0.5){
+\end_layout
+
+\begin_layout Plain Layout
+
+ // This function will return the percentage of battery at the end of
+ the rental.
+\end_layout
+
+\begin_layout Plain Layout
+
+ actualCost = actualCost * 0.8;
+\end_layout
+
+\begin_layout Plain Layout
+
+ // In this way we will apply a 20% of discount to the client.
+\end_layout
+
+\begin_layout Plain Layout
+
+ }
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+ if (ren.report.MSOactived() && ren.report.finalDestinationNotEmpty()){
+\end_layout
+
+\begin_layout Plain Layout
+
+ // The first function will return a 'true' value if the user enabled
+ the Money Saving Option at the beginning of his/her rent.
+ The second funtion will return a 'true' value if the user input his/her
+ final destination.
+\end_layout
+
+\begin_layout Plain Layout
+
+ if (ren.carParkedAt(ren.report.specialArea) && ren.carLeftUnderCharge()){
+\end_layout
+
+\begin_layout Plain Layout
+
+ // The first function will return a 'true' value if the user parked
+ the car in the special area the system provided at the beginning of the
+ rent.
+ The second function will return a 'true' value if the car is left under
+ charge.
+\end_layout
+
+\begin_layout Plain Layout
+
+ actualCost = actualCost * 0.6;
+\end_layout
+
+\begin_layout Plain Layout
+
+ // In this way we will apply a 40% of discount to the client.
+\end_layout
+
+\begin_layout Plain Layout
+
+ else if (ren.carLeftUnderCharge()){
+\end_layout
+
+\begin_layout Plain Layout
+
+ // This function will return a 'true' value if the car is left under
+ charge in another recharging area (not the special one provided by the
+ system at the beginning of the rent).
+\end_layout
+
+\begin_layout Plain Layout
+
+ actualCost = actualCost * 0.7;
+\end_layout
+
+\begin_layout Plain Layout
+
+ // In this way we will apply a 30% of discount to the client.
+\end_layout
+
+\begin_layout Plain Layout
+
+ }
+\end_layout
+
+\begin_layout Plain Layout
+
+ }
+\end_layout
+
+\begin_layout Plain Layout
+
+ else{
+\end_layout
+
+\begin_layout Plain Layout
+
+ if (ren.carLeftUnderCharge()){
+\end_layout
+
+\begin_layout Plain Layout
+
+ // This function will return 'true' if the car is left under charge
+ in a recharging area.
+\end_layout
+
+\begin_layout Plain Layout
+
+ actualCost = actualCost * 0.7;
+\end_layout
+
+\begin_layout Plain Layout
+
+ // In this way we will apply a 30% of discount to the client.
+\end_layout
+
+\begin_layout Plain Layout
+
+ }
+\end_layout
+
+\begin_layout Plain Layout
+
+ }
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+ return totalCost;
+\end_layout
+
+\begin_layout Plain Layout
+
+}
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{lstlisting}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subparagraph*
+calculateAdditionalFee(Rent, float)
+\end_layout
+
+\begin_layout Standard
+\SpecialChar ligaturebreak
+
+\begin_inset space ~
+\end_inset
+
+
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{lstlisting}
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+/* This function will calculate the additional fees for each rent entity.
+ */
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+float function calculateAdditionalFee(Rent ren, float totalCost){
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+ if (ren.report.batteryLevelAtTheEndOfRent <= 0.2 ||
+\end_layout
+
+\begin_layout Plain Layout
+
+ ren.report.distanceFromTheNearestPowerGridStationInKm >= 3){
+\end_layout
+
+\begin_layout Plain Layout
+
+ // The first value is the same explained above
+\end_layout
+
+\begin_layout Plain Layout
+
+ // The second one is the distance from the nearest power grid station
+ expressed in km
+\end_layout
+
+\begin_layout Plain Layout
+
+ actualCost = actualCost * 1.3;
+\end_layout
+
+\begin_layout Plain Layout
+
+ // In this way we will apply a 30% of additional fee to the client.
+\end_layout
+
+\begin_layout Plain Layout
+
+ }
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+return totalCost;
+\end_layout
+
+\begin_layout Plain Layout
+
+}
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{lstlisting}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subparagraph*
+calculateRentFees(Rent)
+\end_layout
+
+\begin_layout Standard
+\SpecialChar ligaturebreak
+
+\begin_inset space ~
+\end_inset
+
+
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{lstlisting}
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+/* 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
+
+\begin_layout Plain Layout
+
+*/
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+function calculateRentFees (Rent ren){
+\end_layout
+
+\begin_layout Plain Layout
+
+
+\end_layout
+
+\begin_layout Plain Layout
+
+ float totalCost = 0.0;
+\end_layout
+
+\begin_layout Plain Layout
+
+
+\end_layout
+
+\begin_layout Plain Layout
+
+ totalCost = ren.report.totalTime * ren.report.pricePerMinute;
+\end_layout
+
+\begin_layout Plain Layout
+
+ // We will first calculate the Total Cost as the multiplication of the
+ Total Time of the Rental and the Actual Price Per Minute.
+ In the future it would be easy to modify them, according to the PowerEnjoy
+ policy.
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+ totalCost = calculateRentDiscount(ren, totalCost);
+\end_layout
+
+\begin_layout Plain Layout
+
+ // In this way we will apply all the discount.
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+ totalCost = calulateAdditionalFee(ren, totalCost);
+\end_layout
+
+\begin_layout Plain Layout
+
+ // In this way we will apply all the additional fees.
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+ paymentHandler(ren.User, totalCost);
+\end_layout
+
+\begin_layout Plain Layout
+
+ // This function will send a request of payment to the external payment
+ service with as input the ID of the user and the amount of money .
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+}
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{lstlisting}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+User Interface Design
+\end_layout
+
+\begin_layout Standard
+In this section we will provide an overview on how the user interfaces of
+ our system will look like.
+\end_layout
+
+\begin_layout Subsection
+UX Diagram
+\end_layout
+
+\begin_layout Standard
+The UX Diagram shows the interactions between the different screens of the
+ User Interface of the clients.
+\begin_inset Newline linebreak
+\end_inset
+
+The services are both accessible via web and mobile application.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/UX Diagram.png
+ width 100text%
+ height 76theight%
+ keepAspectRatio
+ rotateAngle 90
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+UX Diagram
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+User UI
+\end_layout
+
+\begin_layout Standard
+The following mockups represent the user UI, regarding both the Web Browser
+ and the Mobile Application interfaces.
+\end_layout
+
+\begin_layout Subsubsection
+Home Page
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/mockup/pc/HomePage.png
+ width 60text%
+ height 60theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Home Page - Web Browser
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Login
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/mockup/mobile/HomePageMobile.png
+ width 60text%
+ height 60theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Login - Mobile Application
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Registration
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/mockup/pc/Registration Page.png
+ width 70text%
+ height 70theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Registration Page - Web Browser
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/mockup/mobile/RegistrationPageMobile.png
+ width 70text%
+ height 70theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Registration Page - Mobile Application
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Edit Personal Information
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/mockup/pc/EditPersonalInfo.png
+ width 63text%
+ height 63theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Edit Personal Information - Web Browser
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Edit Billing Information
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/mockup/pc/Edit Billing Information.png
+ width 63text%
+ height 63theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Edit Billing Information - Web Browser
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Enable / Disable the Money Saving Option
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/mockup/mobile/Enable MSO.png
+ width 70text%
+ height 70theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Enable Money Saving Option - Mobile Application
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/mockup/mobile/Disable MSO.png
+ width 70text%
+ height 70theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Disable Money Saving Option - Mobile Application
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Start Reservation
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/mockup/mobile/Start Reservation.png
+ width 70text%
+ height 70theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Start Reservation - Mobile Application
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Terminate Reservation
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/mockup/mobile/End Reservation.png
+ width 70text%
+ height 70theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Terminate Reservation - Mobile Application
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Unlock the car
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/mockup/mobile/Unlock Doors.png
+ width 70text%
+ height 70theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Unlock Car's Doors - Mobile Application
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Lock the car
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/mockup/mobile/Lock Doors.png
+ width 70text%
+ height 70theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Lock Car's Doors - Mobile Application
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Requirements Traceability
+\end_layout
+
+\begin_layout Standard
+In the RASD document we have defined all the system's requirements: in this
+ section we explaine how they map into the design elements defined in this
+ document.
+
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Tabular
+
+
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Component (DD)
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Requirements (RASD)
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+4.1.1 Registration of a guest to the system
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Authentication Manager
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+4.1.2 Login of a user into the system
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+AccountInformation Manager
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+4.1.9 Modify the profile information
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+CheckAvailability Manager
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+4.1.3 Find the location of available cars in a specified area
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+4.1.4 Book a car with the possibility to cancel the reservation
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Reservation Manager
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+4.1.6 Be notified of active reservation status
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+4.1.7 End the rental
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Car Manager
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+4.1.3 Available cars in a specified area
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+4.1.4 Book a car with the possibility to cancel the reservation
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+ADS_Application Manager
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+4.1.5 Open his/her reserved car
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+4.1.6 Active reservation status
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Payment Manager
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+4.1.8 Know the total cost at the end of the rental
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+4.1.1 Registration of a guest to the system
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Data Manager
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+4.1.2 Login of a user into the system
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Notification Manager
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+4.1.6 Be notified of active reservation status
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Appendix
+\end_layout
+
+\begin_layout Subsection
+Tools used
+\end_layout
+
+\begin_layout Standard
+We used the following tools to produce this document:
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+LaTex
+\series default
+ as typesetting system to write this document
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+LyX
+\series default
+ as editor
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+Visio Professional
+\series default
+ and
+\series bold
+draw.io
+\series default
+ to draw all the diagrams
+\end_layout
+
+\begin_layout Subsection
+Hours of work
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/hours.png
+ width 50text%
+ height 50theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Newpage pagebreak
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document
diff --git a/2.Design Document/DD.tex b/2.Design Document/DD.tex
new file mode 100644
index 0000000..f1ae4ca
--- /dev/null
+++ b/2.Design Document/DD.tex
@@ -0,0 +1,1216 @@
+%% LyX 2.2.2 created this file. For more info, see http://www.lyx.org/.
+%% Do not edit unless you really know what you are doing.
+\RequirePackage{fix-cm}
+\RequirePackage{fixltx2e}
+\documentclass[english]{article}
+\usepackage[T1]{fontenc}
+\usepackage[latin9]{inputenc}
+\usepackage{geometry}
+\geometry{verbose,lmargin=2.5cm,rmargin=2.5cm}
+\usepackage{babel}
+\usepackage{array}
+\usepackage{float}
+\usepackage{textcomp}
+\usepackage{pdfpages}
+\usepackage{graphicx}
+\usepackage{setspace}
+\usepackage[unicode=true,pdfusetitle,
+ bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,
+ breaklinks=false,pdfborder={0 0 1},backref=false,colorlinks=false]
+ {hyperref}
+
+\makeatletter
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
+%% Because html converters don't know tabularnewline
+\providecommand{\tabularnewline}{\\}
+%% A simple dot to overcome graphicx limitations
+\newcommand{\lyxdot}{.}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
+\usepackage{listings}
+\usepackage{xcolor}
+\usepackage{pdflscape}
+\usepackage{courier}
+%\usepackage{mathtools}
+\usepackage{graphicx}
+\usepackage{booktabs}
+\usepackage[T1]{fontenc}
+\usepackage{lmodern}
+
+\usepackage{listings}
+\lstset{columns=fullflexible}
+
+\usepackage{charter}
+
+\usepackage{xspace}
+
+
+
+% Definizione intestazioni e pie' di pagina
+\usepackage{fancyhdr}
+
+\makeatother
+
+\begin{document}
+\begin{titlepage}
+
+
+\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}
+\center
+\textsc{\LARGE Politecnico di Milano}\\[1.5cm] \textsc{\Large PowerEnjoy}\\[0.5cm]
+\textsc{\Large Software Engineering 2}\\[0.5cm]
+
+\HRule \\[0.4cm] { \huge \bfseries Requirements Analysis and \\ Specification Document}\\[0.4cm] \HRule \\[1.5cm]
+\begin{minipage}{0.4\textwidth} \begin{flushleft} \large \emph{Authors:}\\ Giancarlo \textsc{Colaci} \newline Giulio \textsc{De Pasquale} \newline Francesco \textsc{Rinaldi} \end{flushleft} \end{minipage} ~ \begin{minipage}{0.4\textwidth} \begin{flushright} \large \emph{Supervisor:} \\ Elisabetta \textsc{De Nitto} \end{flushright} \end{minipage}\\[3cm]
+
+\includegraphics[width=0.3\textwidth]{res/img/logopm}
+
+\vfill
+{\large \today}\\[3cm]
+
+\end{titlepage}\newpage{}
+
+\mbox{} \thispagestyle{empty} \newpage
+
+\newpage{}
+
+\tableofcontents{}\thispagestyle{empty}\newpage{}
+
+\mbox{} \thispagestyle{empty} \newpage
+
+\newpage{}
+
+\setcounter{page}{1}
+
+\section{Introduction}
+
+\subsection{Description of the given problem }
+
+We will project and implement PowerEnjoy, which is a new car-sharing
+service that exclusively employs electric cars. The system that will
+be developed has to allow the registration of a new user with all
+his personal information (like name, age, driving license and credit
+card information), log in credentials and the possibility to find
+the locations of available cars within a certain distance from his
+current location or from a specified address. Moreover, according
+to some policies (specified later) the user can obtain exclusive discounts
+and offers.
+
+\subsection{Purpose}
+
+The principal purpose of this document, the Requirement Analysis and
+Specification Document, is to show the functional and non-functional
+requirements of the system-to-be. They will be based on different
+aspects: the needs expressed by the stakeholders, the constraints
+which it is subject to, the typical scenarios that will happen after
+its deployment. The targeted audience in this case will be mainly
+made of software engineers and developers who have to actually develop
+the service here described.
+
+\subsection{Scope}
+
+The system will be an optimization of a pre-existing system for renting
+electric cars already in use in some cities. The new system will let
+users to check reservability and status of available cars, rent or
+reserve them through a mobile or a web application in a more simple
+and effective way. In addition to a better user interface, the new
+system will guarantee a smarter uniform distribution of cars in the
+city, in order to offer a better service for the citizens, and will
+also offer some special discount, in order to incentivize the virtuous
+behaviors of the users.
+
+\subsection{Goals }
+
+PowerEnJoy's users will be able to:
+\begin{itemize}
+\item register themselves to the system;
+\item log into the system;
+\item find the location of available cars in a specified area;
+\item book a car with the possibility to cancel the reservation;
+\item open his / her reserved car;
+\item be notified of active reservation status;
+\item end the rental;
+\item know the total cost at the end of the lease;
+\end{itemize}
+
+\subsection{Stakeholders}
+
+Our primary stakeholder is the professor who gave us this didactical
+project. Our stakeholder's main need is to review the complete project
+at the end of the semester. Our objective is to show him/her we have
+followed the development process in all its parts and that we are
+able to carry out a challenging task from the beginning to the end
+fully comprehending all its internal phases. We want to show that
+we can identify key requirements and specifications, design and test
+our web/mobile application while providing all documentation backing
+up the source code. Finally, our typical users will be people that
+don\textquoteright t have a car or that prefer to rent a car instead
+of a public service transportation to go around the city.
+
+\subsection{Glossary}
+
+Below there are definitions of some terms that will be used in the
+document, in order to avoid any ambiguity in their use and their understanding.
+\begin{description}
+\item [{Guest:}] a person that has never signed up to the system. He can
+only sign up and view available cars
+\item [{User:}] a person already registered in the system who can log in
+and has a personal profile and can use all the functionalities described.
+Unless specified, each user is active: therefore can use the service
+with no restrictions
+\item [{Deactivated~user:}] a user with revoked privileges. He/she cannot
+use the service until the issues with his/her account are solved (e.g.,
+expired license)
+\item [{Login:}] the action of accessing the system via a username and
+related password
+\item [{Notification:}] a real-time alert that warns a user when there
+are updates about what he is dealing with
+\item [{Reservation:}] the action performed by the registered user when
+he chooses to drive an available car. It expires as soon as one of
+these conditions is met: one hour is elapsed from the user's reservation
+request or the car is unlocked
+\item [{Rent:}] the temporary possession and use of one of the PowerEnjoy's
+cars in return for payment by a user. It starts once a minute is elapsed
+from the car doors unlock or the engine is ignited and lasts until
+the doors are re-locked by the system
+\item [{Available:}] a fully functional car ready to be used by a registered
+user
+\item [{Unavailable:}] a car which is currently reserved or used by a registered
+user or is not entirely working (e.g. exhausted battery, mechanical
+damage)
+\item [{Reservable:}] an available car located in a geographical region
+where a registered user is enabled to reserve it
+\item [{Parking~area:}] circumscribed public area where cars can be parked
+(e.g. no parking lots). The set of safe areas for parking cars is
+pre-defined by the management system.
+\item [{Recharging~area:}] it is included in the parking area; cars parked
+here can also be recharged thanks to several charging stations
+\item [{Special~area:}] specific recharging areas decided by the system
+to ensure a uniform distribution of cars in the city
+\item [{RMSS:}] Request Management Sub-System, it is an already developed
+part of our system which stores and manages all the information about
+the PowerEnjoy's cars, users and about their request (reservation
+or rent).
+\item [{MES:}] Maintenance External Service, it is an external service
+that takes care of ordinary or extraordinary car maintenance.
+\item [{ADS:}] Auto Diagnosis System, an always on embedded peripheral
+which continuously monitors the status of the car (e.g. battery charge,
+tires pressure, impact detection)
+\item [{ECS:}] Emergency Call System, an always on embedded peripheral
+which can be used to call the consumer service or an emergency number
+quickly
+\item [{Verification~code:}] it is a four digits code chosen by the user
+during the registration procedure that adds another level of security
+to our service; the user will need it to unlock the car
+\item [{Countdown:}] it is the time given to the user to pick-up the reserved
+car before the reservation expires (during this period the reservation
+is active)
+\item [{EULA:}] End User License Agreement
+\end{description}
+\newpage{}
+
+\section{Overall Description}
+
+\subsection{Proposed System}
+
+The server-side implementation will be structured through a net of
+micro-services mainly written in Python and managed through Docker.
+The server will run the business logic, host PowerEnjoy's website,
+and users' data. Besides, we propose a web/mobile application which
+allows to registered users to use PowerEnjoy's services. The web client
+will use Python/Javascript and HTML5/CSS for web pages generation
+and formatting respectively. We will also use open-source libraries
+such as Flask to speed up the development. The mobile applications
+will be deployed on the main platforms currently available (iOS, Android,
+Windows Phone) and will be written accordingly to each devices' programming
+language. Client-server communication will be platform agnostic since
+it will happen through an encrypted RESTful API which returns its
+data through JSON.
+
+\subsection{Domain Properties}
+
+We suppose these conditions will be respected at any given time:
+\begin{itemize}
+\item the user will request help only if he/she needs it;
+\item the user will never try to exploit the system's features (e.g. sleep
+in the car);
+\item the user will never fake his/her position to cause a denial of service;
+\item the user will only provide correct and authentic information while
+signing up
+\item a booked car will always be driven by the user who reserved it;
+\item the user will never be robbed of the access credentials and the verification
+code;
+\item the user agrees to be geolocalized;
+\item each available car is fully functional;
+\item each car has an embedded key to turn on the engine;
+\item each car is equipped with a properly working ADS and an ECS;
+\item each car is fitted with a properly working notification touchscreen
+display;
+\item an available car will always be found in the supposed position;
+\end{itemize}
+\pagebreak{}
+
+\subsection{Assumptions}
+
+This section explores some of the vague concepts or loosely explained
+ones: further hypotheses have been added to expand the description
+of the requirements and to account better for the interaction between
+the external environment and the developed application.
+
+Due to some unclear points in the specification we made some assumptions,
+which are:
+\begin{itemize}
+\item the system allows users to locate any car in PowerEnjoy's area of
+operation;
+\item the system's money saving option has to be enabled or disabled in
+the user profile;
+\item the system permits users to reserve an available car only in his/her
+city;
+\begin{itemize}
+\item with \textquotedbl{}a certain geographical region\textquotedbl{} we
+mean that the user can reach the vehicle in a reasonable amount of
+time;
+\end{itemize}
+\item the system can locate its users through Cellular Data or GPS;
+\item the system's proximity check is done through one of these: numerical
+code on each cars' windshield or GPS data from user's phone;
+\item the fees are applied as soon as one of these conditions is met: one
+minute is elapsed from the car's doors opening, or the engine is revved;
+\item each seat is equipped with a sensor which is used to detect the number
+of passengers into each car;
+\item each user can't reserve more than one car at the same time;
+\item to be eligible for the 10\% discount, almost two passengers have to
+remain seated at the same time for at least one minute;
+\item if a car is parked in a special area, the discount equals to 40\%;
+\end{itemize}
+
+\subsection{Actors Identifying}
+
+The system provides the interaction of two different types of actors
+who can use different functionalities of the application system. The
+types are set out below along with a brief description of their privileges.
+
+\subsubsection{Guest}
+
+A person that is not registered (yet!) so can check for cars' position,
+register or ask for help/advice.
+
+\paragraph{Privileges:}
+\begin{itemize}
+\item Register to the system by creating a new account;
+\item Check available cars' position and status;
+\item Contact the customer service;
+\end{itemize}
+
+\subsubsection{User}
+
+A person that is already registered to the system with his personal
+information; a guest can become a user after the authentication to
+the system using the login form.
+
+\paragraph{Privileges:}
+\begin{itemize}
+\item Log into the system;
+\item Consult reservations' history;
+\item Edit account information:
+\begin{itemize}
+\item personal and billing data;
+\item enable/disable money saving option;
+\end{itemize}
+\item Check available cars' position and status;
+\item Reserve a reservable car;
+\item Rent the reserved car;
+\item Check active reservation status:
+\begin{itemize}
+\item Remaining time until the reservation expires;
+\item Reserved car's position and status;
+\item Elapsed rental time;
+\end{itemize}
+\item Request help through the ECS;
+\item Terminate the rent;
+\item Contact the customer service;
+\end{itemize}
+
+\subsubsection{Deactivated User}
+
+A user with revoked privileges. He/she cannot use the service until
+the issues with his/her account are solved (e.g expired license).
+
+\paragraph{Privileges:}
+\begin{itemize}
+\item Log into the system;
+\item Consult reservations' history;
+\item Edit account information:
+\begin{itemize}
+\item personal and billing data;
+\item enable/disable money saving option;
+\end{itemize}
+\item Check available cars' position and status;
+\item Contact the customer service;
+\end{itemize}
+\newpage{}
+
+\section{Specific Requirements}
+
+In this section will be analyzed in detail functional and non-functional
+requirements that the system developed has to satisfy, when the domain
+properties previously denoted hold and referring to the declared goals.
+
+\subsection{Functional requirements}
+
+The functional requirements include the functionalities that the system
+must necessarily have and describe the interactions between the system
+developed and the external environment independently from the implementation.
+\begin{enumerate}
+\item Registration of a guest to the system:
+\begin{enumerate}
+\item The system has to guarantee the registration to a new user by creating
+a new account.
+\end{enumerate}
+\item Login of a user into the system:
+\begin{enumerate}
+\item The system has to allow the login to an already registered user when
+he types the correct username and the password in the login form.
+\end{enumerate}
+\item Find the location of available cars in a specified area:
+\begin{enumerate}
+\item The system has to allow both guests and users to specify the address
+where they want to locate an available car or to use their position;
+\item The system has to guarantee that a car is showed on the map if and
+only if it is available (that means that every available car is showed
+and that every showed car is available);
+\item The system has to guarantee that the car's position is regularly showed
+up to date.
+\end{enumerate}
+\item Book a car with the possibility to cancel the reservation:
+\begin{enumerate}
+\item The system has to guarantee that only a user (i.e. not a guest) can
+reserve a car;
+\item The system must be able to check the position of the user;
+\item The system has to guarantee that any user can reserve only one car
+at a time;
+\item The system has to ensure that the same car cannot be reserved at the
+same time by different users;
+\item The system has to guarantee that any user can have at most an active
+reservation;
+\item The system has to guarantee that every reservable car is available;
+\item The system has to ensure that only a reservable car can be reserved;
+\item The system has to guarantee that when a user reserves a car, the latter
+is no more available;
+\item The system has to ensure that only an active reservation can expire
+or be canceled;
+\item The system has to make sure that when a reservation expires or is
+revoked, the car becomes available again;
+\item When a reservation is activated, the system starts a countdown at
+the end of which the reservation expires if the user did not pick-up
+the reserved car;\pagebreak{}
+\end{enumerate}
+\item Open his/her reserved car;
+\begin{enumerate}
+\item The system must be able to check the proximity of the user to the
+reserved car;
+\item The system must be able to check if the money saving option is enabled
+for the current reservation;
+\item The system has to allow the user to insert the verification code;
+\item The system has to unlock the reserved car only if the entered verification
+code is correct;
+\end{enumerate}
+\item Be notified of active reservation status:
+\begin{enumerate}
+\item The system must be able to retrieve the starting time of the rental;
+\item The system must be able to calculate and notify the elapsed time of
+the rental periodically;
+\item The system must be able to communicate with every grid power station
+to check their power plugs' availability;
+\item The system, to ensure a uniform distribution of parked cars, must
+be able to notify the user the nearest selected station where to leave
+the car to get a discount only if he/she inputs a destination and
+the money saving option is active;
+\end{enumerate}
+\item End the rental:
+\begin{enumerate}
+\item The system has to allow the user to communicate that he/she wants
+to terminate the rental using the car's display;
+\item The system has to allow the user to end the rental only if he is in
+a safe parking area;
+\item The system has to guarantee that when a reservation is ended, the
+car becomes available again;
+\end{enumerate}
+\item Know the total cost at the end of the rental:
+\begin{enumerate}
+\item The system has to communicate with the ADS to retrieve the car status
+and rental information;
+\item The system must be able to apply the discounts, if any, handling the
+previously retrieved information;
+\item The system must communicate to the user the final cost of the rental;
+\end{enumerate}
+\end{enumerate}
+
+\subsection{Non-functional requirements }
+
+The non-functional requirements are those not related to the functionality,
+but rather consider the quality of the system to be implemented (Quality
+of Service, QoS), regardless of the application domain.
+
+Security:
+\begin{itemize}
+\item Each user will only be able to access functionality that competes
+to his category, and it is, therefore, necessary to provide an authentication
+method: it will be used the symmetric username/password one. Furthermore,
+each credential will not be stored in cleartext, and client/server
+communications will be protected by asymmetric encryption.
+\end{itemize}
+Portability:
+\begin{itemize}
+\item The client must be compatible with all hardware and software platforms
+to reach as many users as possible. This requirement is satisfied
+by realizing the client as a web application, in this way the only
+assumptions that must be met by users are the availability of a web
+browser and a connection to the Internet.
+\end{itemize}
+Stability and reliability:
+\begin{itemize}
+\item The system must notify the user the result of each his/her transaction
+request while maintaining an optimal level of reliability. Therefore
+it will be able to face with the possible loss of connection between
+clients and the central server by ensuring atomicity of all operations.
+\end{itemize}
+Performance:
+\begin{itemize}
+\item As for performance, the timing of getting and insertion the information
+in the database must be acceptable to do not block the whole system.
+\end{itemize}
+Concurrency management:
+\begin{itemize}
+\item The system must ensure data consistency while dealing with multiple
+concurrent accesses to the same resource in the database by multiple
+users authenticated to the system.
+\end{itemize}
+Graphical User Interfaces (GUIs):
+\begin{itemize}
+\item The system has to include several graphical user interfaces: intuitive,
+complete and exceptionally easy to use. An interface to contain areas
+of input, dialog boxes, buttons, links and drop-down menus will be
+developed. The interfaces will interact with business logic and then
+be differentiated according to user roles in the system: each interface
+will provide access to features that compete for the particular user
+who is logged in.
+\end{itemize}
+\newpage{}
+
+\section{Scenarios}
+
+This section will present some possible situations that may occur
+from the interaction between a user and the system developed.
+
+\quad{}
+
+\subsection{Alice is curious about PowerEnjoy}
+
+Lily tells Alice about a new service called PowerEnjoy: Alice, now
+curious, tries to register to PowerEnjoy. She visits the homepage,
+browses the site a little and then proceeds to the registration page.
+Alice then enters all the data needed by the system to complete the
+process: name and surname, username, email address, password, ID card
+number and license number. To complete the sign-up she finally enters
+the billing information. Once everything is done, the system sends
+her a confirmation mail with a link used to activate her new account.
+She has now completed the registration, and she can log into the system
+and power enjoy the service.
+
+\quad{}
+
+\subsection{Grandpa Peter and his expired license}
+
+Grandpa Peter has been registered to PowerEnjoy for a quite long time.
+He loves the car sharing model, now more than ever since his old Panda
+broke a long time ago and he could not pick up his nephews, David
+and Goliath, from the pool. There is a problem, though: Peter is getting
+old, and his license has to be renewed to drive again. After a long
+day at the Driver and Vehicle Licensing Agency, Grandpa Peter successfully
+got his shiny license back! To reactivate his PowerEnjoy account,
+Peter has to edit his account data and insert the new license card
+number: after having logged in, he proceeds to his personal area by
+clicking \textquotedblleft Edit Personal Data\textquotedbl{}, he puts
+the new data in the system, and finally he saves the changes. Grandpa
+Peter is on the road, again!
+
+\quad{}
+
+\subsection{Grandpa Peter and his nephews}
+
+It's rainy outside, so Grandpa Peter has to pick up his two nephews
+from the pool: he picks up his smartphone and checks if there are
+any available cars near him. He is getting old so he cannot walk for
+a long time, so he reserves the nearest car which, unfortunately,
+has less than 50\% battery charge remaining. Once in the car's reach,
+Peter taps on \textquotedblleft Open Vehicle\textquotedblright{} and
+inputs his verification code. His memory is aging just like him so
+the usual \textquotedblleft 1969\textquotedblright{} code, which corresponds
+to the year he married his beloved Franca, turned into \textquotedblleft 1967\textquotedblright{}
+which is not accepted by the system. The system prompts him again,
+and this time Peter does not fail: the doors unlock, and Grandpa is
+on the road once more! Peter's driving skills are still amazing: he
+picks up the kids and gets home in no time, so he ends the rent. Unfortunately,
+he is not able to use the 20\% discount due to the battery charge
+left, but he will be cut 10\% since he took at least two other people
+in the car.
+
+\pagebreak{}
+
+\subsection{Pablo and Tata go to the cinema}
+
+Tata and Pablo make a great couple. It's Friday night, and the theaters
+are flooded by the latest sci-fi movie everyone love. Pablo loves
+all those lightsabers and starships while Tata just can't get the
+point out of them. The film will start in more than one hour: Pablo
+is ready for the night out, Tata has to fix her makeup. \textquotedblleft Five
+minutes and I am ready!\textquotedbl{} - she said. Unfortunately,
+Pablo forgot to charge his phone so he can't use his phone's GPS to
+save precious battery juice and reserves his PowerEnjoy car by entering
+his address into the app. Time goes by; one hour has passed, and Pablo
+is still waiting for Tata who seems to have no intentions leaving
+the bathroom. The film has just begun, the reservation expired, the
+car is available to be reserved again, and Pablo has to pay 1 fee:
+\textquotedblleft One minute and we are rolling!\textquotedblright{}
+- she said. Pablo, may the force be with you!
+
+\quad{}
+
+\subsection{Gustavo, the discount hunter}
+
+Gustavo is a saver, methodic and old-fashioned man, and he built an
+economic empire from scratch. He owns a vintage 1968 Ford Torino which
+is only used on Saturday afternoons with his closest friend to honor
+the times long gone: on the other days, he mainly uses PowerEnjoy.
+Gustavo has turned on the money saving option while signing up, and
+he loves it. Once in the car, he logs in and proceed to set up his
+seat and insert his destination: the system now calculates the overall
+cars distribution in the city, verifies the availability of power
+plugs in the nearest power grid stations to the arrival and suggests
+to park in a special area just 300 meters away from his destination.
+Once there, Gustavo, just before ending the rental, takes care of
+plugging the car into the power grid: now, the smartphone application
+shows him the total cost which includes the 40\% discount.
+
+\newpage{}
+
+\section{Models }
+
+In this section we are going to abstract from the previously seen
+scenarios in order to have a more high-level description. For this
+purpose we will use UML (Unified Modeling Language) diagrams.
+
+\subsection{Use cases model }
+
+From previously denoted scenarios and from the whole analysis we did
+in this document, we individuated the use cases of the system to be
+developed. In these pictures there are some use Cases diagram which
+represent actors, their use cases and their interactions. Then some
+of them are better explained using a less formal and more narrative
+way.
+
+\begin{figure}[H]
+\begin{centering}
+\includegraphics[width=0.6\textwidth]{res/img/Usecase_guest}
+\par\end{centering}
+\caption{Guest Use Case}
+\end{figure}
+
+\begin{figure}[H]
+\begin{centering}
+\includegraphics[width=1\textwidth]{res/img/usecase_user}
+\par\end{centering}
+\caption{User Use Case}
+\end{figure}
+
+\begin{figure}[H]
+\begin{centering}
+\includegraphics[width=1\textwidth]{res/img/Usecase_disuser}
+\par\end{centering}
+\caption{Deactivated User Use Case}
+\end{figure}
+
+\newpage{}
+
+\subsubsection{Registration}
+
+\begin{tabular}{>{\centering}p{0.2\textwidth}m{0.75\textwidth}}
+\hline
+Actors & \vspace{0.15cm}Guest\vspace{0.15cm}\tabularnewline
+\hline
+Preconditions & \vspace{0.15cm}The guest has a working Internet connection and he
+has not registered an account yet.\vspace{0.15cm}\tabularnewline
+\hline
+Events & \begin{enumerate}
+\item The guest reaches the registration page
+\item The system requires the guest to enter all his/her personal information,
+driving license data and login credentials along with the verification
+code
+\item The guest types the requested information and presses the \textquoteright Next\textquoteright{}
+button
+\item The system verifies the uniqueness of the email, the equality of the
+twice typed passwords and that the driving license is not expired
+yet
+\item The system notifies the guest that he is going to be redirected to
+an external service web page where he will be required to enter his
+billing information
+\item The system receives a confirmation from the external payment service
+about the correctness of the billing information
+\item The system shows to the guest a recap of the information already provided
+and requires him to confirm them, to read and accept the EULA and
+complete the registration
+\item The guest ticks the \textquotedblleft I read carefully, and I accept
+the contract\textquotedblright{} box and presses the \textquotedblleft Confirm
+and Complete Registration\textquotedblright{} button
+\item The system sends an email to notify the correct registration to the
+guest
+\item The system reports the registration and redirects the user to the
+login page
+\end{enumerate}
+\tabularnewline
+\hline
+Postconditions & \vspace{0.15cm}The user has signed up.\vspace{0.15cm}\tabularnewline
+\hline
+Exceptions & \vspace{0.15cm}The email the guest typed has been already used. The
+second password does not match with the first one. One of the fields
+is empty. The SSN is not in compliance with the other guest's personal
+information. The driving license is already expired. The external
+payment service didn't confirm the billing information. The guest
+did not accept the EULA. In these cases the system notifies the error
+and cannot complete the registration.\vspace{0.15cm}\tabularnewline
+\hline
+\end{tabular}
+
+\subsubsection{Log in}
+
+\begin{onehalfspace}
+\begin{tabular}{>{\centering}p{0.2\textwidth}m{0.75\textwidth}}
+\hline
+Actors & \vspace{0.15cm}User or Deactivated User\vspace{0.15cm}\tabularnewline
+\hline
+Preconditions & \vspace{0.15cm}The actor has a working Internet connection and he
+has already registered his account.\vspace{0.15cm}\tabularnewline
+\hline
+Events & \begin{enumerate}
+\item The actor reaches the log in page
+\item The system requires the actor to enter his email and password
+\item The actor types the requested information and press the \textquoteright Log
+in\textquoteright{} button
+\item The system verifies the correctness of the email and password
+\item The system redirects the actor to his personal page
+\end{enumerate}
+\tabularnewline
+\hline
+Postconditions & \vspace{0.15cm}The actor is logged in.\vspace{0.15cm}\tabularnewline
+\hline
+Exceptions & \vspace{0.15cm}The email or the password the actor typed are not
+correct. One of the fields is empty. In these cases the actor can\textquoteright t
+complete the log in. The system notifies the error and cannot complete
+the login.\vspace{0.15cm}\tabularnewline
+\hline
+\end{tabular}
+\end{onehalfspace}
+
+\subsubsection{Edit personal information}
+
+\begin{onehalfspace}
+\begin{tabular}{>{\centering}p{0.2\textwidth}m{0.75\textwidth}}
+\hline
+Actors & \vspace{0.15cm}User or Deactivated User\vspace{0.15cm}\tabularnewline
+\hline
+Preconditions & \vspace{0.15cm}The actor has a working Internet connection and he
+is already logged into the system.\vspace{0.15cm}\tabularnewline
+\hline
+Events & \begin{enumerate}
+\item The actor reaches his personal area
+\item The actor clicks the ``Edit personal information'' button
+\item The system allows the actor to change his address, mobile phone number,
+password (and to confirm it), driving license number, the expiration
+date and the authority who released it
+\item The user enters the new information and presses \textquoteright Save\textquoteright{}
+\item The system verifies the correctness and the completeness of the information
+\item The system shows the actor his updated information
+\end{enumerate}
+\tabularnewline
+\hline
+Postconditions & \vspace{0.15cm}The user has modified his personal information.\vspace{0.15cm}\tabularnewline
+\hline
+Exceptions & \vspace{0.15cm}One of the fields is empty. The second password does
+not match with the first one. The driving license is already expired.
+In these cases the system notifies the error and cannot complete the
+request.\vspace{0.15cm}\tabularnewline
+\hline
+\end{tabular}
+\end{onehalfspace}
+
+\subsubsection{Edit billing information}
+
+\begin{onehalfspace}
+\begin{tabular}{>{\centering}p{0.2\textwidth}m{0.75\textwidth}}
+\hline
+Actors & \vspace{0.15cm}User or Deactivated User\vspace{0.15cm}\tabularnewline
+\hline
+Preconditions & \vspace{0.15cm}The actor has a working Internet connection and he
+is already logged into the system.\vspace{0.15cm} \tabularnewline
+\hline
+Events & \begin{enumerate}
+\item The actor reaches his personal area
+\item The actor clicks the ``Edit billing information'' button
+\item The system notifies the actor that he is going to be redirect to an
+external service web page where he will be required to enter his new
+billing information
+\item The system receives a confirmation from the external payment service
+about the correctness of the new billing information
+\item The system shows the actor his updated information
+\end{enumerate}
+\tabularnewline
+\hline
+Postconditions & \vspace{0.15cm}The user has modified his billing information.\vspace{0.15cm}\tabularnewline
+\hline
+Exceptions & \vspace{0.15cm}The external payment service did not confirm the billing
+information. In this case the system notifies the error and cannot
+complete the request.\vspace{0.15cm}\tabularnewline
+\hline
+\end{tabular}
+\end{onehalfspace}
+
+\subsubsection{Check available cars' position and status}
+
+\begin{onehalfspace}
+\begin{tabular}{>{\centering}p{0.2\textwidth}m{0.75\textwidth}}
+\hline
+Actors & \vspace{0.15cm}Guest, User or Deactivated User\vspace{0.15cm}\tabularnewline
+\hline
+Preconditions & \vspace{0.15cm}The actor has a working Internet connection.\vspace{0.15cm}\tabularnewline
+\hline
+Events & \begin{enumerate}
+\item The actor opens the map
+\item The system requires the actor to enter an address or to use his position
+to localize cars
+\item The actor types the address where he wants to find an available car
+or clicks ``Use my position'' button
+\item The system verifies the correctness of the information and send a
+request to the RMSS
+\item The system receives an answer from the RMSS with the available cars
+and shows them to the actor on the map
+\item The actor taps the icon that stands for the available car he chooses
+\item The system shows to the actor the status of the selected available
+car
+\end{enumerate}
+\tabularnewline
+\hline
+Postconditions & \vspace{0.15cm}The actor obtains all the information about the position
+and the status of any available car in a certain area.\vspace{0.15cm}\tabularnewline
+\hline
+Exceptions & \vspace{0.15cm}The address field is empty. The inserted address is
+not found or the location service does not work. There is no available
+cars in the selected area. In these cases the system notifies the
+error and cannot complete the request.\vspace{0.15cm}\tabularnewline
+\hline
+\end{tabular}
+\end{onehalfspace}
+
+\subsubsection{Reserve a car}
+
+\begin{onehalfspace}
+\begin{tabular}{>{\centering}p{0.2\textwidth}m{0.75\textwidth}}
+\hline
+Actors & User\tabularnewline
+\hline
+Preconditions & \vspace{0.15cm}The user has a working Internet connection, he has
+already checked the position and the status of an available car and
+he is logged into the system for the whole reservation.\vspace{0.15cm}\tabularnewline
+\hline
+Events & \begin{enumerate}
+\item The user clicks on \textquotedblleft Reserve car\textquotedblright{}
+button
+\item The system send to the RMSS the user position and his reservation
+request
+\item The system receives an affirmative answer from the RMSS
+\item The system creates a new instance of the reservation
+\item The system notifies the user the success of the reservation
+\end{enumerate}
+\tabularnewline
+\hline
+Postconditions & \vspace{0.15cm}The user reserved successfully a car.\vspace{0.15cm}\tabularnewline
+\hline
+Exceptions & \vspace{0.15cm}The communication with the RMSS failed. The system
+says to the user that the service is temporarily not available. The
+localization service does not work. The system receives a negative
+answer from the RMSS. In these cases the system notifies the error
+to the user and he cannot complete the reservation.\vspace{0.15cm}\tabularnewline
+\hline
+\end{tabular}
+\end{onehalfspace}
+
+\subsubsection{Open the reserved car}
+
+\begin{onehalfspace}
+\begin{tabular}{>{\centering}p{0.2\textwidth}m{0.75\textwidth}}
+\hline
+Actors & User\tabularnewline
+\hline
+Preconditions & \vspace{0.15cm}The user has a working Internet connection, has already
+reserved a car and he is logged into the system.\vspace{0.15cm}\tabularnewline
+\hline
+Events & \begin{enumerate}
+\item The user reaches the car he reserved.
+\item The system checks user position or requires him to enter the code
+on the windshield
+\item If necessary, the user enters the code he can read on the windshield
+\item The system requires the user enter his verification code
+\item The user types his verification code
+\item The system verifies the correctness of the verification code and the
+status of the reservation
+\item The system unlocks the car doors, terminates the reservation and creates
+a rent instance on the RMSS
+\item The user opens the car doors
+\end{enumerate}
+\tabularnewline
+\hline
+Postconditions & \vspace{0.15cm}The user can get in the car.\vspace{0.15cm}\tabularnewline
+\hline
+Exceptions & \vspace{0.15cm}The user failed to unlock the car in less than one
+hour: the system notifies the end of the reservation to the user,
+declares the reserved car as available again and applies 1 of fee
+to the user. | The system is not able to check the user position.
+The user fails to enter the windshield code. The verification code
+is not correct. In these cases the system doesn\textquoteright t unlock
+the doors.\vspace{0.15cm}\tabularnewline
+\hline
+\end{tabular}
+\end{onehalfspace}
+
+\subsubsection{Use the reserved car and terminate the rent}
+
+\begin{onehalfspace}
+\begin{tabular}{>{\centering}p{0.2\textwidth}m{0.75\textwidth}}
+\hline
+Actors & User\tabularnewline
+\hline
+Preconditions & \vspace{0.15cm}The user has a working Internet connection, has already
+opened his reserved car and he is logged into the system.\vspace{0.15cm}\tabularnewline
+\hline
+Events & \begin{enumerate}
+\item If the money saving option is actived, the user can enter his final
+address on the touchscreen display in the car
+\item If the user did it, the system shows a special parking area near his
+destination
+\item The user starts the engine and uses the car
+\item As a matter of choice, the user takes care of plugging the car into
+the power grid
+\item The user clicks ``Terminate rent''
+\item The system verifies nobody is in the car and that it is in a safe
+parking area
+\item The system locks the car doors again, verifies the car's status and
+updates the rent instance
+\item If necessary, the system contacts the MES for an ordinary (or extraordinary)
+car maintenance.
+\item The system calculates the total cost and notifies the end of the rental
+to the user along with the total cost
+\end{enumerate}
+\tabularnewline
+\hline
+Postconditions & \vspace{0.15cm}The user successfully rented a car.\vspace{0.15cm}\tabularnewline
+\hline
+Exceptions & \vspace{0.15cm}The address is not correct or it is not found. The
+system notifies the error to the user and requires him to insert it
+again. | The car is not in a safe parking area. The car is not empty.
+In these cases the system doesn\textquoteright t allow to terminate
+the rent. | The user can't pay the total cost: the system deactivate
+the user.\vspace{0.15cm}\tabularnewline
+\hline
+\end{tabular}
+\end{onehalfspace}
+
+\subsubsection{Contact customer service}
+
+\begin{onehalfspace}
+\begin{tabular}{>{\centering}m{0.2\textwidth}m{0.75\textwidth}}
+\hline
+Actors & Guest, User or Deactivated User\tabularnewline
+\hline
+Preconditions & \vspace{0.15cm}The actor has a working Internet connection.\vspace{0.15cm}\tabularnewline
+\hline
+Events & \begin{enumerate}
+\item The actor reaches the \textquotedblleft Contact the Customer Service\textquotedblright{}
+page
+\item The system requires the actor to enter his own name, surname, mobile
+phone number, email address and to explain his problem in less than
+1000 words
+\item The user types the requested information and press the \textquoteleft Contact
+the Customer Service\textquotedblright{} button
+\item The system redirects the request of the user to the customer service.
+\end{enumerate}
+\tabularnewline
+\hline
+Postconditions & \vspace{0.15cm}The actor successfully contacted the customer service.\vspace{0.15cm}\tabularnewline
+\hline
+Exceptions & \vspace{0.15cm}The actor uses more than 1000 words to explain his
+request. There is at least one empty field. In these cases the system
+notifies the error and cannot complete the request.\vspace{0.15cm}\tabularnewline
+\hline
+\end{tabular}
+\end{onehalfspace}
+
+\newpage{}
+
+\subsection{Sequence Diagram}
+
+This section presents the sequence diagram of the most important interaction,
+in order to have a dynamic sight of the main entities too.
+
+\begin{figure}[H]
+\begin{centering}
+\includegraphics[width=1\textwidth,height=1\textheight,keepaspectratio]{res/img/seqdia_reg}
+\par\end{centering}
+\caption{Registration Sequence Diagram}
+\end{figure}
+
+\newpage{}
+
+\begin{figure}[H]
+\begin{centering}
+\includegraphics[width=0.7\textwidth,height=0.7\textheight,keepaspectratio]{res/img/seqdia_login}
+\par\end{centering}
+\caption{Login Sequence Diagram}
+\end{figure}
+
+\newpage{}
+
+\begin{figure}[H]
+\begin{centering}
+\includegraphics[width=1\textwidth,height=0.9\textheight,keepaspectratio]{res/img/seqdia_checkavailability}
+\par\end{centering}
+\caption{Check Cars' Availability Sequence Diagram}
+\end{figure}
+
+\newpage{}
+
+\begin{figure}[H]
+\begin{centering}
+\includegraphics[width=1\textwidth,height=0.7\textheight,keepaspectratio]{res/img/seqdia_editinfo}
+\par\end{centering}
+\caption{Modify Personal Information Sequence Diagram}
+\end{figure}
+
+\newpage{}
+
+\begin{figure}[H]
+\begin{centering}
+\includegraphics[width=1\textwidth,height=1\textheight,keepaspectratio]{res/img/seqdia_editbilling}
+\par\end{centering}
+\caption{Modify Billing Information Sequence Diagram}
+\end{figure}
+
+\newpage{}
+
+\begin{figure}[H]
+\begin{centering}
+\includegraphics[width=1\textwidth,height=1\textheight,keepaspectratio]{res/img/seqdia_reservation}
+\par\end{centering}
+\caption{ Car Reservation Sequence Diagram}
+\end{figure}
+
+\newpage{}
+
+\begin{figure}[H]
+\begin{centering}
+\includegraphics[width=1\textwidth,height=1\textheight,keepaspectratio]{res/img/seqdia_opencar}
+\par\end{centering}
+\caption{Car Unlock Sequence Diagram}
+\end{figure}
+
+\newpage{}
+
+\begin{figure}[H]
+\begin{centering}
+\includegraphics[width=1\textwidth,height=1\textheight]{res/img/seqdia_rent}
+\par\end{centering}
+\caption{Car Rental Sequence Diagram}
+\end{figure}
+
+\newpage{}
+
+\begin{figure}[H]
+\begin{centering}
+\includegraphics[width=1\textwidth,height=1\textheight,keepaspectratio]{res/img/seqdia_contact}
+\par\end{centering}
+\caption{Contact Customer Service Sequence Diagram}
+\end{figure}
+
+\newpage{}
+
+\subsection{Class Diagram}
+
+Here it is shown a class diagram in order to give a static sight of
+the main involved entities and of their relations. The diagram, whose
+aim is just to better specificy requirements, is shown in this picture.
+
+\quad{}
+
+\begin{figure}[H]
+\begin{centering}
+\includegraphics[width=1\textwidth,height=1\textheight,keepaspectratio]{res/img/ClassD}
+\par\end{centering}
+\caption{Class Diagram}
+\end{figure}
+
+\newpage{}
+
+\section{Alloy}
+
+In this section we tried to verify the consistency of our class diagram.
+To this goal, we realized a formal model of the system based both
+on the class diagram and in the previously done assumptions and considerations
+about constraints. We realized this model using Alloy syntax, thanks
+to which we get on formally describing the domain of our application
+and its properties. Then we verified the consistency of our model
+using Alloy Analyzer. Here there is the code of the model of the system.
+
+\quad{}
+
+\lstdefinelanguage{alloy}
+{keywords={%
+ assert, pred, all, no, lone, one, some, check, run,
+ but, let, implies, not, iff, in, and, or, set, sig, Int, int,
+if, then, else, exactly, disj, fact, fun, module, abstract,
+ extends, open, none, univ, iden, seq,
+ },
+ literate=%
+ {:}{$\colon\ $}1
+ %{|}{$\bullet$}1
+ {==}{$=$}1
+ {=}{$=\ $}1
+ {!=}{$\neq\ $}1
+ {&&}{$\land$}1
+ {||}{$\lor\ $}1
+ {<=}{$\le\ $}1
+ {>=}{$\ge\ $}1
+ %{all}{$\forall\ $}1
+ {exists}{$\exists\ $}1
+ {!in}{$\not\in\ $}1
+ {\\in}{$\in$}1
+ {=>}{$\implies\ $}2
+ % the following isn't actually Alloy, but it gives the option to produce nicer latex
+ {|=>}{$\Rightarrow$}2
+ {<=set}{$\subseteq$}1
+ {+set}{$\cup$}1
+ {*set}{$\cap$}1
+ {==>}{$\Longrightarrow$}3
+ {<==>}{$\Longleftrightarrow$}4
+ {...}{$\ldots$}1
+ {\\hl}{$\hline$}1
+ {\\alpha}{$\alpha$}1
+ {\\beta}{$\beta$}1
+ {\\gamma}{$\gamma$}1
+ {\\delta}{$\delta$}1
+ {\\epsilon}{$\epsilon$}1
+ {\\zeta}{$\zeta$}1
+ {\\eta}{$\eta$}1
+ {\\theta}{$\theta$}1
+ {\\iota}{$\iota$}1
+ {\\kappa}{$\kappa$}1
+ {\\lambda}{$\lambda$}1
+ {\\mu}{$\mu$}1
+ {\\nu}{$\nu$}1
+ {\\xi}{$\xi$}1
+ {\\pi}{$\pi$}1
+ {\\rho}{$\rho$}1
+ {\\sigma}{$\sigma$}1
+ {\\tau}{$\tau$}1
+ {\\upsilon}{$\upsilon$}1
+ {\\phi}{$\phi$}1
+ {\\chi}{$\chi$}1
+ {\\psi}{$\psi$}1
+ {\\omega}{$\omega$}1
+ {\\Gamma}{$\Gamma$}1
+ {\\Delta}{$\Delta$}1
+ {\\Theta}{$\Theta$}1
+ {\\Lambda}{$\Lambda$}1
+ {\\Xi}{$\Xi$}1
+ {\\Pi}{$\Pi$}1
+ {\\Sigma}{$\Sigma$}1
+ {\\Upsilon}{$\Upsilon$}1
+ {\\Phi}{$\Phi$}1
+ {\\Psi}{$\Psi$}1
+ {\\Omega}{$\Omega$}1
+ {\\EOF}{\;}1
+ ,
+ sensitive=true, % case sensitive
+ morecomment=[l]//,%
+ morecomment=[l]{--},%
+ morecomment=[s]{/*}{*/},%
+ morestring=[b]",
+ numbers=none,
+ firstnumber=1,
+ numberstyle=\tiny,
+ stepnumber=2,
+ basicstyle=\scriptsize\ttfamily\large,
+ commentstyle=\bfseries\color{blue!20!black!50!green},
+ keywordstyle=\bfseries\color{blue},
+ numberstyle=\bfseries\color{red},
+ ndkeywordstyle=\bfseries\color{red},
+ tabsize=2,
+ columns=fullflexible,
+}
+% inline
+\def\A{%
+ \lstinline[language=alloy,basicstyle=\ttfamily,columns=fixed]}
+
+% paragraph
+\lstnewenvironment{alloy}[1][]{%
+ \lstset{language=alloy,
+ floatplacement={tbp},captionpos=b,
+ xleftmargin=8pt,xrightmargin=8pt,basicstyle=\ttfamily,#1}}{}
+
+% paragraph from file
+\newcommand{\alloyfile}[1]{
+ \lstinputlisting[language=alloy,%
+ frame=lines,xleftmargin=8pt,xrightmargin=8pt,basicstyle=\ttfamily,columns=fixed]{#1}
+
+}
+\lstinputlisting[language=alloy]{res/alloy/AlloyPowerEnjoy.als}
+
+\newpage{}
+
+\subsection{Generated Worlds }
+
+Here are presented three generated worlds, according to the model
+specified in Alloy.
+
+\includepdf[angle=90]{res/img/alloy_mondo_1}
+
+\newpage{}
+
+\includepdf[angle=90]{res/img/alloy_mondo_3}
+
+\newpage{}
+
+\includepdf[angle=90]{res/img/alloy_mondo_2}
+
+\section{Appendix}
+
+\subsection{Tools used}
+
+We used the following tools to produce this document:
+\begin{itemize}
+\item \textbf{LaTex} as typesetting system to write this document
+\item \textbf{LyX} as editor
+\item \textbf{Visio Professional} to draw all the diagrams
+\item \textbf{Alloy Analyzer 4.2} to write and verify alloy models
+\end{itemize}
+
+\subsection{Hours spent}
+
+\begin{figure}[H]
+\begin{centering}
+\includegraphics[width=0.5\textwidth,height=0.5\textheight,keepaspectratio]{res/img/hours}
+\par\end{centering}
+\pagebreak{}
+\end{figure}
+
+\end{document}
diff --git a/2.Design Document/res/Cap5.xlsx b/2.Design Document/res/Cap5.xlsx
new file mode 100644
index 0000000..11de619
Binary files /dev/null and b/2.Design Document/res/Cap5.xlsx differ
diff --git a/2.Design Document/res/RASD+DD SEQUENCE DIAGRAM.vsdx b/2.Design Document/res/RASD+DD SEQUENCE DIAGRAM.vsdx
new file mode 100644
index 0000000..07557ce
Binary files /dev/null and b/2.Design Document/res/RASD+DD SEQUENCE DIAGRAM.vsdx differ
diff --git a/2.Design Document/res/img/ComponentView.png b/2.Design Document/res/img/ComponentView.png
new file mode 100644
index 0000000..4d51c11
Binary files /dev/null and b/2.Design Document/res/img/ComponentView.png differ
diff --git a/2.Design Document/res/img/DeploymentView.png b/2.Design Document/res/img/DeploymentView.png
new file mode 100644
index 0000000..5f7a3ee
Binary files /dev/null and b/2.Design Document/res/img/DeploymentView.png differ
diff --git a/2.Design Document/res/img/HardwareRepresentation.png b/2.Design Document/res/img/HardwareRepresentation.png
new file mode 100644
index 0000000..e81e4fb
Binary files /dev/null and b/2.Design Document/res/img/HardwareRepresentation.png differ
diff --git a/2.Design Document/res/img/HighLevel Components.png b/2.Design Document/res/img/HighLevel Components.png
new file mode 100644
index 0000000..fd54505
Binary files /dev/null and b/2.Design Document/res/img/HighLevel Components.png differ
diff --git a/2.Design Document/res/img/MultiTier Architecture.png b/2.Design Document/res/img/MultiTier Architecture.png
new file mode 100644
index 0000000..ad0d2de
Binary files /dev/null and b/2.Design Document/res/img/MultiTier Architecture.png differ
diff --git a/2.Design Document/res/img/Sequence Diagrams/availability.png b/2.Design Document/res/img/Sequence Diagrams/availability.png
new file mode 100644
index 0000000..978259a
Binary files /dev/null and b/2.Design Document/res/img/Sequence Diagrams/availability.png differ
diff --git a/2.Design Document/res/img/Sequence Diagrams/editpersonalinfo.png b/2.Design Document/res/img/Sequence Diagrams/editpersonalinfo.png
new file mode 100644
index 0000000..88affb0
Binary files /dev/null and b/2.Design Document/res/img/Sequence Diagrams/editpersonalinfo.png differ
diff --git a/2.Design Document/res/img/Sequence Diagrams/login.png b/2.Design Document/res/img/Sequence Diagrams/login.png
new file mode 100644
index 0000000..a2d2667
Binary files /dev/null and b/2.Design Document/res/img/Sequence Diagrams/login.png differ
diff --git a/2.Design Document/res/img/Sequence Diagrams/opencar.png b/2.Design Document/res/img/Sequence Diagrams/opencar.png
new file mode 100644
index 0000000..c208403
Binary files /dev/null and b/2.Design Document/res/img/Sequence Diagrams/opencar.png differ
diff --git a/2.Design Document/res/img/Sequence Diagrams/registration.png b/2.Design Document/res/img/Sequence Diagrams/registration.png
new file mode 100644
index 0000000..3d1814f
Binary files /dev/null and b/2.Design Document/res/img/Sequence Diagrams/registration.png differ
diff --git a/2.Design Document/res/img/Sequence Diagrams/rental.png b/2.Design Document/res/img/Sequence Diagrams/rental.png
new file mode 100644
index 0000000..68e2765
Binary files /dev/null and b/2.Design Document/res/img/Sequence Diagrams/rental.png differ
diff --git a/2.Design Document/res/img/Sequence Diagrams/rentcar.png b/2.Design Document/res/img/Sequence Diagrams/rentcar.png
new file mode 100644
index 0000000..68e2765
Binary files /dev/null and b/2.Design Document/res/img/Sequence Diagrams/rentcar.png differ
diff --git a/2.Design Document/res/img/Sequence Diagrams/reservecar.png b/2.Design Document/res/img/Sequence Diagrams/reservecar.png
new file mode 100644
index 0000000..c928090
Binary files /dev/null and b/2.Design Document/res/img/Sequence Diagrams/reservecar.png differ
diff --git a/2.Design Document/res/img/UX Diagram.png b/2.Design Document/res/img/UX Diagram.png
new file mode 100644
index 0000000..9e235f2
Binary files /dev/null and b/2.Design Document/res/img/UX Diagram.png differ
diff --git a/2.Design Document/res/img/hours.png b/2.Design Document/res/img/hours.png
new file mode 100644
index 0000000..0d85361
Binary files /dev/null and b/2.Design Document/res/img/hours.png differ
diff --git a/2.Design Document/res/img/logopm.pdf b/2.Design Document/res/img/logopm.pdf
new file mode 100644
index 0000000..3ab2531
Binary files /dev/null and b/2.Design Document/res/img/logopm.pdf differ
diff --git a/2.Design Document/res/img/logopm.svg b/2.Design Document/res/img/logopm.svg
new file mode 100644
index 0000000..0326ad7
--- /dev/null
+++ b/2.Design Document/res/img/logopm.svg
@@ -0,0 +1,65 @@
+
+
+
+
diff --git a/2.Design Document/res/img/milan.png b/2.Design Document/res/img/milan.png
new file mode 100644
index 0000000..dc544ca
Binary files /dev/null and b/2.Design Document/res/img/milan.png differ
diff --git a/2.Design Document/res/img/milan2.png b/2.Design Document/res/img/milan2.png
new file mode 100644
index 0000000..6142cdc
Binary files /dev/null and b/2.Design Document/res/img/milan2.png differ
diff --git a/2.Design Document/res/img/mockup/mobile/Disable MSO.png b/2.Design Document/res/img/mockup/mobile/Disable MSO.png
new file mode 100644
index 0000000..9ec56e0
Binary files /dev/null and b/2.Design Document/res/img/mockup/mobile/Disable MSO.png differ
diff --git a/2.Design Document/res/img/mockup/mobile/Enable MSO.png b/2.Design Document/res/img/mockup/mobile/Enable MSO.png
new file mode 100644
index 0000000..cb7208e
Binary files /dev/null and b/2.Design Document/res/img/mockup/mobile/Enable MSO.png differ
diff --git a/2.Design Document/res/img/mockup/mobile/End Reservation.png b/2.Design Document/res/img/mockup/mobile/End Reservation.png
new file mode 100644
index 0000000..446a6ad
Binary files /dev/null and b/2.Design Document/res/img/mockup/mobile/End Reservation.png differ
diff --git a/2.Design Document/res/img/mockup/mobile/HomePageMobile.png b/2.Design Document/res/img/mockup/mobile/HomePageMobile.png
new file mode 100644
index 0000000..a9bd229
Binary files /dev/null and b/2.Design Document/res/img/mockup/mobile/HomePageMobile.png differ
diff --git a/2.Design Document/res/img/mockup/mobile/Lock Doors.png b/2.Design Document/res/img/mockup/mobile/Lock Doors.png
new file mode 100644
index 0000000..05b098e
Binary files /dev/null and b/2.Design Document/res/img/mockup/mobile/Lock Doors.png differ
diff --git a/2.Design Document/res/img/mockup/mobile/RegistrationPageMobile.png b/2.Design Document/res/img/mockup/mobile/RegistrationPageMobile.png
new file mode 100644
index 0000000..e1714c3
Binary files /dev/null and b/2.Design Document/res/img/mockup/mobile/RegistrationPageMobile.png differ
diff --git a/2.Design Document/res/img/mockup/mobile/Start Reservation.png b/2.Design Document/res/img/mockup/mobile/Start Reservation.png
new file mode 100644
index 0000000..54ec265
Binary files /dev/null and b/2.Design Document/res/img/mockup/mobile/Start Reservation.png differ
diff --git a/2.Design Document/res/img/mockup/mobile/Unlock Doors.png b/2.Design Document/res/img/mockup/mobile/Unlock Doors.png
new file mode 100644
index 0000000..9824545
Binary files /dev/null and b/2.Design Document/res/img/mockup/mobile/Unlock Doors.png differ
diff --git a/2.Design Document/res/img/mockup/pc/Edit Billing Information.png b/2.Design Document/res/img/mockup/pc/Edit Billing Information.png
new file mode 100644
index 0000000..881afeb
Binary files /dev/null and b/2.Design Document/res/img/mockup/pc/Edit Billing Information.png differ
diff --git a/2.Design Document/res/img/mockup/pc/EditPersonalInfo.png b/2.Design Document/res/img/mockup/pc/EditPersonalInfo.png
new file mode 100644
index 0000000..3cc6d78
Binary files /dev/null and b/2.Design Document/res/img/mockup/pc/EditPersonalInfo.png differ
diff --git a/2.Design Document/res/img/mockup/pc/HomePage.png b/2.Design Document/res/img/mockup/pc/HomePage.png
new file mode 100644
index 0000000..21a4fd8
Binary files /dev/null and b/2.Design Document/res/img/mockup/pc/HomePage.png differ
diff --git a/2.Design Document/res/img/mockup/pc/Registration Page.png b/2.Design Document/res/img/mockup/pc/Registration Page.png
new file mode 100644
index 0000000..3b00609
Binary files /dev/null and b/2.Design Document/res/img/mockup/pc/Registration Page.png differ
diff --git a/2.Design Document/settings/alloy.sty b/2.Design Document/settings/alloy.sty
new file mode 100644
index 0000000..37f96c9
--- /dev/null
+++ b/2.Design Document/settings/alloy.sty
@@ -0,0 +1,101 @@
+% alloy.sty
+% Alloy mode for the LaTeX listings package.
+% This is public domain
+
+\lstdefinelanguage{alloy}{
+ keywords={%
+ assert, pred, all, no, lone, one, some, check, run,
+ but, let, implies, not, iff, in, and, or, set, sig, Int, int,
+ if, then, else, exactly, disj, fact, fun, module, abstract,
+ extends, open, none, univ, iden, seq,
+ },
+ literate=%
+ {:}{$\colon$}1
+ {|}{$\bullet$}1
+ {==}{$=$}1
+ {=}{$=$}1
+ {!=}{$\neq$}1
+ {&&}{$\land$}1
+ {||}{$\lor$}1
+ {<=}{$\le$}1
+ {>=}{$\ge$}1
+ {all}{$\forall$}1
+ {exists}{$\exists$}1
+ {!in}{$\not\in$}1
+ {\\in}{$\in$}1
+ {=>}{$\implies$}2
+ % the following isn't actually Alloy, but it gives the option to produce nicer latex
+ {|=>}{$\Rightarrow$}2
+ {<=set}{$\subseteq$}1
+ {+set}{$\cup$}1
+ {*set}{$\cap$}1
+ {==>}{$\Longrightarrow$}3
+ {<==>}{$\Longleftrightarrow$}4
+ {...}{$\ldots$}1
+ {\\hl}{$\hline$}1
+ {\\alpha}{$\alpha$}1
+ {\\beta}{$\beta$}1
+ {\\gamma}{$\gamma$}1
+ {\\delta}{$\delta$}1
+ {\\epsilon}{$\epsilon$}1
+ {\\zeta}{$\zeta$}1
+ {\\eta}{$\eta$}1
+ {\\theta}{$\theta$}1
+ {\\iota}{$\iota$}1
+ {\\kappa}{$\kappa$}1
+ {\\lambda}{$\lambda$}1
+ {\\mu}{$\mu$}1
+ {\\nu}{$\nu$}1
+ {\\xi}{$\xi$}1
+ {\\pi}{$\pi$}1
+ {\\rho}{$\rho$}1
+ {\\sigma}{$\sigma$}1
+ {\\tau}{$\tau$}1
+ {\\upsilon}{$\upsilon$}1
+ {\\phi}{$\phi$}1
+ {\\chi}{$\chi$}1
+ {\\psi}{$\psi$}1
+ {\\omega}{$\omega$}1
+ {\\Gamma}{$\Gamma$}1
+ {\\Delta}{$\Delta$}1
+ {\\Theta}{$\Theta$}1
+ {\\Lambda}{$\Lambda$}1
+ {\\Xi}{$\Xi$}1
+ {\\Pi}{$\Pi$}1
+ {\\Sigma}{$\Sigma$}1
+ {\\Upsilon}{$\Upsilon$}1
+ {\\Phi}{$\Phi$}1
+ {\\Psi}{$\Psi$}1
+ {\\Omega}{$\Omega$}1
+ {\\EOF}{\;}1
+ ,
+ sensitive=true, % case sensitive
+ morecomment=[l]//,%
+ morecomment=[l]{--},%
+ morecomment=[s]{/*}{*/},%
+ morestring=[b]",
+ numbers=none,
+ firstnumber=1,
+ numberstyle=\tiny,
+ stepnumber=2,
+ basicstyle=\scriptsize\ttfamily,
+ commentstyle=\itshape,
+ keywordstyle=\bfseries,
+ ndkeywordstyle=\bfseries,
+}
+
+% inline
+\def\A{%
+ \lstinline[language=alloy,basicstyle=\ttfamily,columns=fixed]}
+
+% paragraph
+\lstnewenvironment{alloy}[1][]{%
+ \lstset{language=alloy,
+ floatplacement={tbp},captionpos=b,
+ xleftmargin=8pt,xrightmargin=8pt,basicstyle=\ttfamily,#1}}{}
+
+% paragraph from file
+\newcommand{\alloyfile}[1]{
+ \lstinputlisting[language=alloy,%
+ frame=lines,xleftmargin=8pt,xrightmargin=8pt,basicstyle=\ttfamily,columns=fixed]{#1}
+}
\ No newline at end of file
diff --git a/2.Design Document/settings/mychapterheadings.sty b/2.Design Document/settings/mychapterheadings.sty
new file mode 100644
index 0000000..5959008
--- /dev/null
+++ b/2.Design Document/settings/mychapterheadings.sty
@@ -0,0 +1,33 @@
+\usepackage[usename]{xcolor}
+
+% Titoli di capitolo con numerazione
+\def\@makechapterhead#1{%
+ \vspace*{6\p@}%
+ {\parindent \z@ \reset@font
+ %\thickhrulefill
+ \par\nobreak
+
+ {\color{gray} \bfseries \fontsize{60}{65}\selectfont \thechapter}
+ {\sffamily \hspace{1em} \huge #1}
+
+ \par\nobreak
+ \interlinepenalty\@M
+ %\hrule
+ \vspace*{10\p@}%
+ \vskip 30\p@
+ }}
+
+% Titoli capitolo senza numerazione (e.g. Indice)
+\def\@makeschapterhead#1{%
+ \vspace*{30\p@}%
+ {\parindent \z@ \reset@font
+ %\thickhrulefill
+ \par\nobreak
+ {\sffamily \huge #1}
+ \par\nobreak
+ \interlinepenalty\@M
+ %\hrule
+ \vspace*{10\p@}%
+ \vskip 30\p@
+ }}
+
diff --git a/2.Design Document/settings/theme.tex b/2.Design Document/settings/theme.tex
new file mode 100644
index 0000000..bbadbce
--- /dev/null
+++ b/2.Design Document/settings/theme.tex
@@ -0,0 +1,44 @@
+%% STILE DELLE INTESTAZIONI %%
+
+\pagestyle{fancy}
+\renewcommand{\chaptermark}[1]{\markboth{#1}{}} % aggiungi \thechapter.\ per anche il numero capitolo
+%\renewcommand{\sectionmark}[1]{\markright{#1}} % titoli di sezione
+\fancyhf{}
+\fancyhead[RE,RO]{\small\thepage}
+\fancyhead[LE,LO]{\small\em\leftmark} % \leftmark = 2.TitoloCapitolo, \rightmark = TitoloSezione
+%\fancyhead[LO]{\small\em\rightmark} % LO = Left Odd, RO = Right Odd, LE = Left Even, RE = Right Even
+\fancypagestyle{plain}{ % titolo di sezione e simili
+ \fancyhf{} % remove everything
+ \renewcommand{\headrulewidth}{0pt} % remove lines as well
+ \renewcommand{\footrulewidth}{0pt}
+}
+
+%% Stile dei titoli di capitolo %%
+\makeatletter
+\def\thickhrulefill{\leavevmode \leaders \hrule height 0.7ex \hfill \kern \z@}
+\def\@makechapterhead#1{%
+ \vspace*{10\p@}%
+ {\parindent \z@ \centering \reset@font
+ %\thickhrulefill
+ \par\nobreak \vspace{3\p@}
+ {\huge \bfseries \sffamily \strut \thechapter.\ #1}\par\nobreak
+ \interlinepenalty\@M
+ \hrule
+ \vspace*{10\p@}%
+ \vskip 30\p@
+ }}
+
+\def\@makeschapterhead#1{%
+ \vspace*{10\p@}%
+ \vspace*{10\p@}%
+ {\parindent \z@ \centering \reset@font
+ %\thickhrulefill
+ \par\nobreak \vspace{3\p@}
+ {\huge \bfseries \sffamily \strut #1}\par\nobreak
+ \interlinepenalty\@M
+ \hrule
+ \vspace*{10\p@}%
+ \vskip 30\p@
+ }}
+
+
diff --git a/3.Integration Test Plan Document/ITPD.lyx b/3.Integration Test Plan Document/ITPD.lyx
new file mode 100644
index 0000000..991c8f0
--- /dev/null
+++ b/3.Integration Test Plan Document/ITPD.lyx
@@ -0,0 +1,2377 @@
+#LyX 2.2 created this file. For more info see http://www.lyx.org/
+\lyxformat 508
+\begin_document
+\begin_header
+\save_transient_properties true
+\origin unavailable
+\textclass article
+\begin_preamble
+\usepackage{listings}
+\usepackage{xcolor}
+\usepackage{pdflscape}
+\usepackage{courier}
+%\usepackage{mathtools}
+\usepackage{graphicx}
+\usepackage{booktabs}
+\usepackage[T1]{fontenc}
+\usepackage{lmodern}
+
+\usepackage{listings}
+\lstset{columns=fullflexible}
+
+\usepackage{charter}
+
+\usepackage{xspace}
+\usepackage{algorithmicx}
+\usepackage{algpseudocode}
+
+
+% Definizione intestazioni e pie' di pagina
+\usepackage{fancyhdr}
+
+% _____________________________
+\lstdefinelanguage{JS}{
+keywords={typeof, new, true, false, catch, function, return, null, catch, switch, var, if, in, while, do, else, case, break},
+keywordstyle=\color{blue}\bfseries,
+ndkeywords={class, export, boolean, throw, implements, import, this}, ndkeywordstyle=\color{darkgray}\bfseries,
+identifierstyle=\color{black},
+sensitive=false,
+comment=[l]{//},
+morecomment=[s]{/*}{*/},
+commentstyle=\color{purple}\ttfamily,
+stringstyle=\color{red}\ttfamily,
+morestring=[b]',
+morestring=[b]"
+}
+
+
+\definecolor{dkgreen}{rgb}{0,0.6,0}
+\definecolor{gray}{rgb}{0.5,0.5,0.5}
+\definecolor{mauve}{rgb}{0.58,0,0.82}
+\lstset{frame=tb,
+language=JS,
+aboveskip=3mm,
+belowskip=3mm,
+showstringspaces=false,
+columns=flexible,
+basicstyle={\small\ttfamily},
+numbers=none,
+numberstyle=\tiny\color{gray},
+keywordstyle=\color{blue},
+commentstyle=\color{dkgreen},
+stringstyle=\color{mauve},
+breaklines=true,
+breakatwhitespace=true,
+tabsize=3 }
+
+% _____________________________
+\end_preamble
+\use_default_options true
+\begin_modules
+InStar
+graphicboxes
+fix-cm
+fixltx2e
+fixme
+customHeadersFooters
+pdfform
+\end_modules
+\maintain_unincluded_children false
+\begin_forced_local_layout
+Format 60
+Style "In Preamble"
+ Category "FrontMatter"
+ Margin Static
+ LatexType Paragraph
+ InTitle 0
+ InPreamble 1
+ TocLevel -1000
+ NeedProtect 0
+ KeepEmpty 0
+ NextNoIndent 0
+ CommandDepth 0
+ LatexName "dummy"
+ ItemCommand item
+ LabelType No_Label
+ EndLabelType No_Label
+ ParagraphGroup "0"
+ ParIndent MM
+ ParSkip 0.4
+ ItemSep 0
+ TopSep 0
+ BottomSep 0
+ LabelBottomSep 0
+ ParSep 0
+ NewLine 1
+ Align Block
+ AlignPossible Block, Center, Layout, Left, Right
+ FreeSpacing 0
+ PassThru 0
+ ParbreakIsNewline 0
+ RefPrefix OFF
+ HTMLLabelFirst 0
+ HTMLStyle
+div.standard {
+margin-bottom: 2ex;
+}
+ EndHTMLStyle
+ HTMLForceCSS 0
+ HTMLTitle 0
+ Spellcheck 1
+ ForceLocal 1
+End
+Style "In Title"
+ Category "FrontMatter"
+ Margin Static
+ LatexType Paragraph
+ InTitle 1
+ InPreamble 0
+ TocLevel -1000
+ NeedProtect 0
+ KeepEmpty 0
+ NextNoIndent 0
+ CommandDepth 0
+ LatexName "dummy"
+ ItemCommand item
+ LabelType No_Label
+ EndLabelType No_Label
+ ParagraphGroup "0"
+ ParIndent MM
+ ParSkip 0.4
+ ItemSep 0
+ TopSep 0
+ BottomSep 0
+ LabelBottomSep 0
+ ParSep 0
+ NewLine 1
+ Align Block
+ AlignPossible Block, Center, Layout, Left, Right
+ FreeSpacing 0
+ PassThru 0
+ ParbreakIsNewline 0
+ RefPrefix OFF
+ HTMLLabelFirst 0
+ HTMLStyle
+div.standard {
+margin-bottom: 2ex;
+}
+ EndHTMLStyle
+ HTMLForceCSS 0
+ HTMLTitle 0
+ Spellcheck 1
+ ForceLocal 1
+End
+\end_forced_local_layout
+\language english
+\language_package default
+\inputencoding auto
+\fontencoding global
+\font_roman "default" "default"
+\font_sans "default" "default"
+\font_typewriter "default" "default"
+\font_math "auto" "auto"
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_osf false
+\font_sf_scale 100 100
+\font_tt_scale 100 100
+\graphics default
+\default_output_format default
+\output_sync 1
+\bibtex_command default
+\index_command default
+\float_placement H
+\paperfontsize default
+\spacing single
+\use_hyperref true
+\pdf_bookmarks true
+\pdf_bookmarksnumbered false
+\pdf_bookmarksopen false
+\pdf_bookmarksopenlevel 1
+\pdf_breaklinks false
+\pdf_pdfborder false
+\pdf_colorlinks false
+\pdf_backref false
+\pdf_pdfusetitle true
+\papersize default
+\use_geometry true
+\use_package amsmath 1
+\use_package amssymb 1
+\use_package cancel 1
+\use_package esint 1
+\use_package mathdots 1
+\use_package mathtools 1
+\use_package mhchem 1
+\use_package stackrel 1
+\use_package stmaryrd 1
+\use_package undertilde 1
+\cite_engine basic
+\cite_engine_type default
+\biblio_style plain
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\justification true
+\use_refstyle 1
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\leftmargin 2.5cm
+\rightmargin 2.5cm
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\quotes_language english
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\end_header
+
+\begin_body
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{titlepage}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+
+\backslash
+newcommand{
+\backslash
+HRule}{
+\backslash
+rule{
+\backslash
+linewidth}{0.5mm}}
+\end_layout
+
+\begin_layout Plain Layout
+
+
+\backslash
+center
+\end_layout
+
+\begin_layout Plain Layout
+
+
+\backslash
+textsc{
+\backslash
+LARGE Politecnico di Milano}
+\backslash
+
+\backslash
+[1.5cm]
+\backslash
+textsc{
+\backslash
+Large PowerEnjoy}
+\backslash
+
+\backslash
+[0.5cm]
+\end_layout
+
+\begin_layout Plain Layout
+
+
+\backslash
+textsc{
+\backslash
+Large Software Engineering 2}
+\backslash
+
+\backslash
+[0.5cm]
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\begin_layout Plain Layout
+
+
+\backslash
+HRule
+\backslash
+
+\backslash
+[0.4cm] {
+\backslash
+huge
+\backslash
+bfseries Integration Test Plan Document}
+\backslash
+
+\backslash
+[0.4cm]
+\backslash
+HRule
+\backslash
+
+\backslash
+[1.5cm]
+\end_layout
+
+\begin_layout Plain Layout
+
+
+\backslash
+begin{minipage}{0.4
+\backslash
+textwidth}
+\backslash
+begin{flushleft}
+\backslash
+large
+\backslash
+emph{Authors:}
+\backslash
+
+\backslash
+ Giancarlo
+\backslash
+textsc{Colaci}
+\backslash
+newline Giulio
+\backslash
+textsc{De Pasquale}
+\backslash
+newline Francesco
+\backslash
+textsc{Rinaldi}
+\backslash
+end{flushleft}
+\backslash
+end{minipage} ~
+\backslash
+begin{minipage}{0.4
+\backslash
+textwidth}
+\backslash
+begin{flushright}
+\backslash
+large
+\backslash
+emph{Supervisor:}
+\backslash
+
+\backslash
+ Elisabetta
+\backslash
+textsc{De Nitto}
+\backslash
+end{flushright}
+\backslash
+end{minipage}
+\backslash
+
+\backslash
+[3cm]
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Graphics
+ filename res/img/logopm.pdf
+ width 30text%
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+vfill
+\end_layout
+
+\begin_layout Plain Layout
+
+{
+\backslash
+large
+\backslash
+today}
+\backslash
+
+\backslash
+[3cm]
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+end{titlepage}
+\end_layout
+
+\end_inset
+
+
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+mbox{}
+\backslash
+thispagestyle{empty}
+\backslash
+newpage
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset toc
+LatexCommand tableofcontents
+
+\end_inset
+
+
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+thispagestyle{empty}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+setcounter{page}{1}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Introduction
+\end_layout
+
+\begin_layout Subsection
+Revision History
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Tabular
+
+
+
+
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Version
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Date
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Author(s)
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Summary
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+1.1
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+14/01/2017
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Giancarlo Colaci, Giulio De Pasquale, Francesco Rinaldi
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Minor fixes
+\end_layout
+
+\end_inset
+
+
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+1.0
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+08/01/2017
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Giancarlo Colaci, Giulio De Pasquale, Francesco Rinaldi
+\end_layout
+
+\end_inset
+
+
+\begin_inset Text
+
+\begin_layout Plain Layout
+Initial Release
+\end_layout
+
+\end_inset
+
+
+
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\end_layout
+
+\begin_layout Subsection
+Purpose and Scope
+\end_layout
+
+\begin_layout Standard
+The Integration Test Plan Document (
+\series bold
+ITPD
+\series default
+) mainly serves to describe how integration tests are to be performed.
+ The tests here described focus on the information's flow between modules
+ opposed to the modules themselves.
+ Specifically it describes the adopted methodologies ranging from the sets
+ of all tests to be performed to the tools used throughout the whole process.
+ The system will be an optimization of a pre-existing system for renting
+ electric cars already in use in some cities.
+ The new system will let users to check reservability and status of available
+ cars, rent or reserve them through a mobile or a web application in a more
+ simple and effective way.
+\end_layout
+
+\begin_layout Subsection
+Definitions, Acronyms, Abbreviations
+\end_layout
+
+\begin_layout Standard
+Below there are definitions of some terms that will be used in the document,
+ in order to avoid any ambiguity in their use and their understanding.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Note Note
+status open
+
+\begin_layout Plain Layout
+[REMOVE ME WHEN YOU HAVE DONE THIS: DA COMPLETARE]
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection*
+Definitions
+\end_layout
+
+\begin_layout Description
+Component: each of the low level components realizing the functionalities
+ of a subsystem
+\end_layout
+
+\begin_layout Description
+Subsystem: a high-level functional unit of the system
+\end_layout
+
+\begin_layout Description
+[..]
+\end_layout
+
+\begin_layout Subsubsection*
+Acronyms
+\end_layout
+
+\begin_layout Description
+DBMS: DataBase Management System, a software that control the creation,
+ maintenance and use of a database.
+ (e.g.
+ MySQL)
+\end_layout
+
+\begin_layout Description
+API: Application Programming Interface
+\end_layout
+
+\begin_layout Description
+RASD: Requirement Analysis and Specification Document
+\end_layout
+
+\begin_layout Description
+DD: Design Document
+\end_layout
+
+\begin_layout Description
+[..]
+\end_layout
+
+\begin_layout Subsubsection*
+Abbreviations
+\end_layout
+
+\begin_layout Description
+Req.
+ as for Requirement
+\end_layout
+
+\begin_layout Description
+WebApp as for Web Application
+\end_layout
+
+\begin_layout Description
+[..]
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Reference documents
+\end_layout
+
+\begin_layout Itemize
+Requirements Analysis and Specification Document produced before: [RASD.pdf]
+\end_layout
+
+\begin_layout Itemize
+Design Document produced before: [DD.pdf]
+\end_layout
+
+\begin_layout Itemize
+Specification Document: [ASSIGNMENTS AA 2016-2017.pdf]
+\end_layout
+
+\begin_layout Itemize
+The documentation of any tool you plan to use for testing [REMEMBER TO UPDATE]
+\end_layout
+
+\begin_layout Standard
+\begin_inset Note Note
+status open
+
+\begin_layout Plain Layout
+TODO
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Document Structure
+\end_layout
+
+\begin_layout Standard
+\begin_inset Note Note
+status open
+
+\begin_layout Plain Layout
+Se decidiamo di tenere la Document Structure, dobbiamo ultimarla.
+ È un qualcosa che va fatto alla fine.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Enumerate
+
+\series bold
+Introduction
+\series default
+: this section introduces the Integration Test Plan Document.
+ It contains a justification of his utility and ...
+\end_layout
+
+\begin_layout Enumerate
+
+\series bold
+Integration Strategy
+\series default
+: this section is divided into different parts.
+\end_layout
+
+\begin_deeper
+\begin_layout Itemize
+
+\shape italic
+Entry Criteria
+\shape default
+: this sections explains the criteria that must be met before integration
+ testing of specific elements may begin (e.g., functions must have been unit
+ tested).
+\end_layout
+
+\begin_layout Itemize
+
+\shape italic
+Elements to be Integrated
+\shape default
+: this sections gives a global view of the components of the application
+ to be integrated, in a consistent way with our design.
+\end_layout
+
+\begin_layout Itemize
+
+\shape italic
+Integration Testing Strategy
+\shape default
+: this sections gives a more detailed view of the integration testing approach
+ (top‐down, bottom‐up, functional groupings, etc.) and about the reasons
+ for the choosing that approach.
+\end_layout
+
+\begin_layout Itemize
+
+\shape italic
+Sequence of Component / Function Integration
+\shape default
+: [..]
+\end_layout
+
+\begin_deeper
+\begin_layout Itemize
+
+\shape italic
+Software Integration Sequence
+\shape default
+: this section shows, for each subsystem, the sequence in which the software
+ components will be integrated within the subsystem.
+\end_layout
+
+\begin_layout Itemize
+
+\shape italic
+Subsystem Integration Sequence
+\shape default
+: this section shows the order in which subsystems will be integrated.
+\end_layout
+
+\end_deeper
+\end_deeper
+\begin_layout Enumerate
+
+\series bold
+Individual Steps and Test Description
+\series default
+: this section describes, for each step of the integration process above,
+ the type of tests that will be used to verify that the elements integrated
+ in this step perform as expected.
+ (REMOVE: Describe in general the expected results of the test set.
+ You may refer to Chapter 3 and Chapter 4 of the test plan example [1] as
+ an example of what we expect.)
+\end_layout
+
+\begin_layout Enumerate
+
+\series bold
+Tools and Test Equipment Required
+\series default
+: this section presents all tools and test equipment needed to accomplish
+ the integration.
+ (REMOVE: Refer to the tools presented during the lectures.
+ Explain why and how you are going to use them.
+ Note that you may also use manual testing for some part.
+ Consider manual testing as one of the possible tools you have available)
+\end_layout
+
+\begin_layout Enumerate
+
+\series bold
+Program Stubs and Test Data Required
+\series default
+: this section aims to identify any program stubs or special test data required
+ for each integration step, based on the testing strategy and test design.
+\end_layout
+
+\begin_layout Enumerate
+
+\series bold
+Appendix
+\series default
+: in this section will be listed the different tools we used and the hours
+ of work spent by each member of the team.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+
+\series bold
+Integration Strategy
+\end_layout
+
+\begin_layout Subsection
+Entry Criteria
+\end_layout
+
+\begin_layout Standard
+This section lists all the prerequisites that need to be met
+\shape italic
+before
+\shape default
+ any integration testing begins in order achieve valid and worthwhile results.
+\end_layout
+
+\begin_layout Standard
+All the classes and methods will be
+\series bold
+tested
+\series default
+ against several unit tests to detect major faults in algorithms and classes'
+ structure.
+ Each unit test has to cover at least the 90% of lines of code and will
+ be run automatically on each build.
+ However unit testing is not in the scope of this document and will not
+ be specified in further detail.
+\end_layout
+
+\begin_layout Standard
+The whole project will be
+\series bold
+constantly inspected
+\series default
+ to ensure maintainability, detect possible issues and coding conventions
+ breakages which could increase the testers' effort in next testing phases.
+ Continuous code inspection must be performed using automated tools as much
+ as possible: manual testing should be reserved for the most difficult features
+ to test.
+\end_layout
+
+\begin_layout Standard
+Finally, the
+\series bold
+documentation
+\series default
+ has to be complete and up-to-date to be used as a reference for integration
+ testing development.
+ In particular, the public interfaces of each class and module should be
+ well referenced.
+ Where necessary, a formal specification language can be used.
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\series bold
+The following documents must be delivered before integration testing can
+ begin:
+\end_layout
+
+\begin_layout Itemize
+
+\shape slanted
+Requirement Analysis and Specification Document of PowerEnjoy
+\end_layout
+
+\begin_layout Itemize
+
+\shape slanted
+Design Document of PowerEnjoy
+\end_layout
+
+\begin_layout Itemize
+
+\shape slanted
+Integration Testing Plan Document of PowerEnjoy
+\end_layout
+
+\begin_layout Subsection
+Elements to be Integrated
+\end_layout
+
+\begin_layout Standard
+For a detailed description of each components function and interaction refer
+ to the
+\series bold
+Design Document
+\series default
+, section 2.3.
+
+\end_layout
+
+\begin_layout Subsection
+Integration Testing Strategy
+\end_layout
+
+\begin_layout Standard
+The chosen strategy for the integration testing is the
+\series bold
+bottom-up
+\series default
+ approach.
+\end_layout
+
+\begin_layout Standard
+It allows the testers to focus on each main component as little as possible
+ since each test will be developed in great detail starting from the inner
+ classes in our specification: from that point on, each component will rely
+ on a strong codebase which reduces the time spent on reviewing the project
+ internals.
+\end_layout
+
+\begin_layout Subsection
+Component / Subsystem Testing
+\end_layout
+
+\begin_layout Standard
+Due to the complex nature of testing an entire system, we planned the integratio
+n testing following two point of views, both of them catalogued through
+ a
+\series bold
+dependency-driven
+\series default
+ order: the detailed
+\shape slanted
+component
+\shape default
+ testing and the top-view
+\shape slanted
+subsystem
+\shape default
+ testing.
+\end_layout
+
+\begin_layout Subsubsection
+Component testing
+\end_layout
+
+\begin_layout Standard
+This section illustrates how every component will be integrated along in
+ order to constitute a subsystem.
+\end_layout
+
+\begin_layout Subsubsection*
+Core Data
+\end_layout
+
+\begin_layout Standard
+The first two elements to be integrated are the
+\series bold
+Data Manager
+\series default
+ and the
+\series bold
+Database Management System
+\series default
+ components.
+ We start from here because every other component relies on Data Access
+ Utilities to perform queries on the underlying data structure.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/Core Data.png
+ width 60text%
+ height 60theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Core Data
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection*
+Account Management
+\end_layout
+
+\begin_layout Standard
+The
+\shape slanted
+Account Management
+\shape default
+ subsystem relies on the
+\series bold
+Authentication Manager
+\series default
+ and the
+\series bold
+AccountInformation Manager
+\series default
+.
+ The first one manages the correctness of user data submitted by the clients
+ to provide access to the PowerEnjoy services; the latter, instead, edits
+ and provides access to every account in the DBMS.
+\end_layout
+
+\begin_layout Standard
+They both need the
+\series bold
+Core Data
+\series default
+ subsystem to operate correctly.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/Account Management 1.png
+ width 60text%
+ height 60theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Authentication Manager
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/Account Management 2.png
+ width 60text%
+ height 60theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+AccountInformation Manager
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection*
+Car Management
+\end_layout
+
+\begin_layout Standard
+The
+\shape slanted
+Car Management
+\shape default
+ subsystem relies on the
+\series bold
+ADS_Application Manager
+\series default
+ and the
+\series bold
+Car Manager
+\series default
+.
+ The
+\series bold
+ADS_Application Manager
+\series default
+has to guarantee the correct communication between the
+\series bold
+Car Manager
+\series default
+ and every ADS installed on each car.
+ The
+\series bold
+Car Manager
+\series default
+ handles the status of each car by communicating the ADS installed on each
+ car.
+\end_layout
+
+\begin_layout Standard
+They both need the
+\series bold
+Core Data
+\series default
+ subsystem to operate correctly.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/Car Management 1.png
+ width 60text%
+ height 60theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+ADS_Application Manager
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/Car Management 2.png
+ width 100text%
+ height 80theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Car Manager
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection*
+Reservation Management
+\end_layout
+
+\begin_layout Standard
+The
+\shape slanted
+Reservation Management
+\shape default
+ subsystem relies on the
+\series bold
+CheckAvailability Manager
+\series default
+ and the
+\series bold
+Reservation Manager
+\series default
+.
+ The
+\series bold
+CheckAvailability Manager
+\series default
+is responsible for searching available cars in a specific location.
+ The
+\series bold
+Reservation Manager
+\series default
+ handles each reservation by creating new entries, checking active entries
+ information and terminating active ones.
+\end_layout
+
+\begin_layout Standard
+They both need the
+\series bold
+Core Data
+\series default
+ and the
+\series bold
+Car Management
+\series default
+ subsystems to operate correctly.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/Reservation Management 1.png
+ width 100text%
+ height 80theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+CheckAvailability Manager
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/Reservation Management 2.png
+ width 100text%
+ height 80theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Reservation Manager
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection*
+Events Handler
+\end_layout
+
+\begin_layout Standard
+The
+\shape slanted
+Event Handler
+\shape default
+ subsystem relies on the
+\series bold
+Payment Manager
+\series default
+ and the
+\series bold
+Notification Manager
+\series default
+.
+ The
+\series bold
+Payment Manager
+\series default
+calculates the fees for the rides at the end of each reservation and send
+ a payment request to an external service.
+ The
+\series bold
+Notification Manager
+\series default
+ handles every notification sent by the system to both server and client
+ side.
+\end_layout
+
+\begin_layout Standard
+They both need the
+\series bold
+Core Data
+\series default
+ and the
+\series bold
+Reservation Management
+\series default
+ subsystems to operate correctly.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/Events Handler 1.png
+ width 100text%
+ height 80theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Payment Manager
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/Events Handler 2.png
+ width 100text%
+ height 80theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Notification Manager
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection*
+Interfaces
+\end_layout
+
+\begin_layout Standard
+The
+\shape slanted
+Interface
+\shape default
+ subsystem relies on the
+\series bold
+App GUI
+\series default
+ and the
+\series bold
+Web GUI
+\series default
+.
+\end_layout
+
+\begin_layout Standard
+They both need the
+\series bold
+Core Data, Reservation Management
+\series default
+and
+\series bold
+ Account Management
+\series default
+ subsystems to operate correctly.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/Interfaces 1 bis.png
+ width 100text%
+ height 80theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+PowerEnjoyApp GUI
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/Interfaces 2 bis.png
+ width 100text%
+ height 80theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+PowerEnjoyWeb GUI
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\end_layout
+
+\begin_layout Subsubsection
+Subsystem Testing
+\end_layout
+
+\begin_layout Standard
+This section shows the order in which subsystems will be integrated.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Note Note
+status open
+
+\begin_layout Plain Layout
+Da invertire freccia reservation manager??
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/2.4.2.png
+ width 100text%
+ height 100theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption Standard
+
+\begin_layout Plain Layout
+Subsystem Integration Sequence
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+
+\series bold
+Individual Steps and Test Description
+\end_layout
+
+\begin_layout Standard
+This section describes, for each step of the integration process above,
+ the type of tests that will be used to verify that the elements integrated
+ in this step perform as expected.
+\end_layout
+
+\begin_layout Standard
+In the Sequence Diagrams shown in the Section 2.5 of the Design Document
+ can be found a more detailed representation of the components interaction.
+\end_layout
+
+\begin_layout Subsubsection*
+Account Management
+\end_layout
+
+\begin_layout Standard
+Functions implemented by
+\series bold
+Authentication Manager
+\series default
+:
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\family typewriter
+register
+\family default
+ : This function creates a new entity
+\family typewriter
+user
+\family default
+ in the system with all the information provided by the user.
+ If the entered data are correct, an email is sent to the user address to
+ confirm the correct registration to the service.
+\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
+\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
+A non-null user
+\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
+\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
+A non-null user
+\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
+
+
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\family typewriter
+login
+\family default
+: This function allows any registered user to log into the system using
+ his username and password.
+ If the credentials are correct, the function returns a token to be used
+ in the future requests to identify the user.
+ Otherwise, an error is returned.
+\end_layout
+
+\begin_layout Subsubsection*
+
+\series bold
+AccountInformation Manager
+\end_layout
+
+\begin_layout Standard
+Functions implemented by
+\series bold
+AccountInformation Manager
+\series default
+:
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{edit
+\backslash
+_profile}
+\end_layout
+
+\end_inset
+
+: This function allows registered users to edit their profile information.
+
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{enable
+\backslash
+_mso}
+\end_layout
+
+\end_inset
+
+: This function allows registered users to enable the money saving option.
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{disable
+\backslash
+_mso}
+\end_layout
+
+\end_inset
+
+: This function allows registered users to disable the money saving option.
+\begin_inset VSpace smallskip
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+texttt{consult
+\backslash
+_history}
+\end_layout
+
+\end_inset
+
+: This function allows registered users to consult their reservation history.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection*
+Car Management
+\end_layout
+
+\begin_layout Subsubsection*
+Reservation Management
+\end_layout
+
+\begin_layout Subsubsection*
+Events Handler
+\end_layout
+
+\begin_layout Subsubsection*
+Interfaces
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+
+\series bold
+Tools and Test Equipment Required
+\end_layout
+
+\begin_layout Standard
+This section presents all tools and test equipment needed to accomplish
+ the integration.
+ (REMOVE: Refer to the tools presented during the lectures.
+ Explain why and how you are going to use them.
+ Note that you may also use manual testing for some part.
+ Consider manual testing as one of the possible tools you have available)
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+
+\series bold
+Program Stubs and Test Data Required
+\end_layout
+
+\begin_layout Standard
+this section aims to identify any program stubs or special test data required
+ for each integration step, based on the testing strategy and test design.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Newpage newpage
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Appendix [TO UPDATE]
+\end_layout
+
+\begin_layout Subsection
+Tools used
+\end_layout
+
+\begin_layout Standard
+We used the following tools to produce this document:
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+LaTex
+\series default
+ as typesetting system to write this document
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+LyX
+\series default
+ as editor
+\end_layout
+
+\begin_layout Itemize
+
+\series bold
+Visio Professional
+\series default
+ and
+\series bold
+draw.io
+\series default
+ to draw all the diagrams
+\end_layout
+
+\begin_layout Subsection
+Hours of work
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+ filename res/img/hours.png
+ width 50text%
+ height 50theight%
+ keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Newpage pagebreak
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document
diff --git a/3.Integration Test Plan Document/res/Cap5.xlsx b/3.Integration Test Plan Document/res/Cap5.xlsx
new file mode 100644
index 0000000..f1ce461
Binary files /dev/null and b/3.Integration Test Plan Document/res/Cap5.xlsx differ
diff --git a/3.Integration Test Plan Document/res/img/2.4.2 [OLD].png b/3.Integration Test Plan Document/res/img/2.4.2 [OLD].png
new file mode 100644
index 0000000..beb77ff
Binary files /dev/null and b/3.Integration Test Plan Document/res/img/2.4.2 [OLD].png differ
diff --git a/3.Integration Test Plan Document/res/img/2.4.2.png b/3.Integration Test Plan Document/res/img/2.4.2.png
new file mode 100644
index 0000000..6b313b8
Binary files /dev/null and b/3.Integration Test Plan Document/res/img/2.4.2.png differ
diff --git a/3.Integration Test Plan Document/res/img/Account Management 1.png b/3.Integration Test Plan Document/res/img/Account Management 1.png
new file mode 100644
index 0000000..9daaec5
Binary files /dev/null and b/3.Integration Test Plan Document/res/img/Account Management 1.png differ
diff --git a/3.Integration Test Plan Document/res/img/Account Management 2.png b/3.Integration Test Plan Document/res/img/Account Management 2.png
new file mode 100644
index 0000000..15bae93
Binary files /dev/null and b/3.Integration Test Plan Document/res/img/Account Management 2.png differ
diff --git a/3.Integration Test Plan Document/res/img/Car Management 1.png b/3.Integration Test Plan Document/res/img/Car Management 1.png
new file mode 100644
index 0000000..7c29a88
Binary files /dev/null and b/3.Integration Test Plan Document/res/img/Car Management 1.png differ
diff --git a/3.Integration Test Plan Document/res/img/Car Management 2.png b/3.Integration Test Plan Document/res/img/Car Management 2.png
new file mode 100644
index 0000000..f1b57c6
Binary files /dev/null and b/3.Integration Test Plan Document/res/img/Car Management 2.png differ
diff --git a/3.Integration Test Plan Document/res/img/Core Data.png b/3.Integration Test Plan Document/res/img/Core Data.png
new file mode 100644
index 0000000..b15f003
Binary files /dev/null and b/3.Integration Test Plan Document/res/img/Core Data.png differ
diff --git a/3.Integration Test Plan Document/res/img/Events Handler 1.png b/3.Integration Test Plan Document/res/img/Events Handler 1.png
new file mode 100644
index 0000000..6def2f5
Binary files /dev/null and b/3.Integration Test Plan Document/res/img/Events Handler 1.png differ
diff --git a/3.Integration Test Plan Document/res/img/Events Handler 2.png b/3.Integration Test Plan Document/res/img/Events Handler 2.png
new file mode 100644
index 0000000..0d2fa71
Binary files /dev/null and b/3.Integration Test Plan Document/res/img/Events Handler 2.png differ
diff --git a/3.Integration Test Plan Document/res/img/Interfaces 1 bis.png b/3.Integration Test Plan Document/res/img/Interfaces 1 bis.png
new file mode 100644
index 0000000..08d11b9
Binary files /dev/null and b/3.Integration Test Plan Document/res/img/Interfaces 1 bis.png differ
diff --git a/3.Integration Test Plan Document/res/img/Interfaces 1.png b/3.Integration Test Plan Document/res/img/Interfaces 1.png
new file mode 100644
index 0000000..dbac4dc
Binary files /dev/null and b/3.Integration Test Plan Document/res/img/Interfaces 1.png differ
diff --git a/3.Integration Test Plan Document/res/img/Interfaces 2 bis.png b/3.Integration Test Plan Document/res/img/Interfaces 2 bis.png
new file mode 100644
index 0000000..5cc6a27
Binary files /dev/null and b/3.Integration Test Plan Document/res/img/Interfaces 2 bis.png differ
diff --git a/3.Integration Test Plan Document/res/img/Interfaces 2.png b/3.Integration Test Plan Document/res/img/Interfaces 2.png
new file mode 100644
index 0000000..8a7fe70
Binary files /dev/null and b/3.Integration Test Plan Document/res/img/Interfaces 2.png differ
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
new file mode 100644
index 0000000..fb73525
Binary files /dev/null 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
new file mode 100644
index 0000000..c48af03
Binary files /dev/null and b/3.Integration Test Plan Document/res/img/Reservation Management 2.png differ
diff --git a/3.Integration Test Plan Document/res/img/logopm.pdf b/3.Integration Test Plan Document/res/img/logopm.pdf
new file mode 100644
index 0000000..3ab2531
Binary files /dev/null and b/3.Integration Test Plan Document/res/img/logopm.pdf differ
diff --git a/3.Integration Test Plan Document/res/img/logopm.svg b/3.Integration Test Plan Document/res/img/logopm.svg
new file mode 100644
index 0000000..0326ad7
--- /dev/null
+++ b/3.Integration Test Plan Document/res/img/logopm.svg
@@ -0,0 +1,65 @@
+
+
+
+
diff --git a/3.Integration Test Plan Document/settings/alloy.sty b/3.Integration Test Plan Document/settings/alloy.sty
new file mode 100644
index 0000000..37f96c9
--- /dev/null
+++ b/3.Integration Test Plan Document/settings/alloy.sty
@@ -0,0 +1,101 @@
+% alloy.sty
+% Alloy mode for the LaTeX listings package.
+% This is public domain
+
+\lstdefinelanguage{alloy}{
+ keywords={%
+ assert, pred, all, no, lone, one, some, check, run,
+ but, let, implies, not, iff, in, and, or, set, sig, Int, int,
+ if, then, else, exactly, disj, fact, fun, module, abstract,
+ extends, open, none, univ, iden, seq,
+ },
+ literate=%
+ {:}{$\colon$}1
+ {|}{$\bullet$}1
+ {==}{$=$}1
+ {=}{$=$}1
+ {!=}{$\neq$}1
+ {&&}{$\land$}1
+ {||}{$\lor$}1
+ {<=}{$\le$}1
+ {>=}{$\ge$}1
+ {all}{$\forall$}1
+ {exists}{$\exists$}1
+ {!in}{$\not\in$}1
+ {\\in}{$\in$}1
+ {=>}{$\implies$}2
+ % the following isn't actually Alloy, but it gives the option to produce nicer latex
+ {|=>}{$\Rightarrow$}2
+ {<=set}{$\subseteq$}1
+ {+set}{$\cup$}1
+ {*set}{$\cap$}1
+ {==>}{$\Longrightarrow$}3
+ {<==>}{$\Longleftrightarrow$}4
+ {...}{$\ldots$}1
+ {\\hl}{$\hline$}1
+ {\\alpha}{$\alpha$}1
+ {\\beta}{$\beta$}1
+ {\\gamma}{$\gamma$}1
+ {\\delta}{$\delta$}1
+ {\\epsilon}{$\epsilon$}1
+ {\\zeta}{$\zeta$}1
+ {\\eta}{$\eta$}1
+ {\\theta}{$\theta$}1
+ {\\iota}{$\iota$}1
+ {\\kappa}{$\kappa$}1
+ {\\lambda}{$\lambda$}1
+ {\\mu}{$\mu$}1
+ {\\nu}{$\nu$}1
+ {\\xi}{$\xi$}1
+ {\\pi}{$\pi$}1
+ {\\rho}{$\rho$}1
+ {\\sigma}{$\sigma$}1
+ {\\tau}{$\tau$}1
+ {\\upsilon}{$\upsilon$}1
+ {\\phi}{$\phi$}1
+ {\\chi}{$\chi$}1
+ {\\psi}{$\psi$}1
+ {\\omega}{$\omega$}1
+ {\\Gamma}{$\Gamma$}1
+ {\\Delta}{$\Delta$}1
+ {\\Theta}{$\Theta$}1
+ {\\Lambda}{$\Lambda$}1
+ {\\Xi}{$\Xi$}1
+ {\\Pi}{$\Pi$}1
+ {\\Sigma}{$\Sigma$}1
+ {\\Upsilon}{$\Upsilon$}1
+ {\\Phi}{$\Phi$}1
+ {\\Psi}{$\Psi$}1
+ {\\Omega}{$\Omega$}1
+ {\\EOF}{\;}1
+ ,
+ sensitive=true, % case sensitive
+ morecomment=[l]//,%
+ morecomment=[l]{--},%
+ morecomment=[s]{/*}{*/},%
+ morestring=[b]",
+ numbers=none,
+ firstnumber=1,
+ numberstyle=\tiny,
+ stepnumber=2,
+ basicstyle=\scriptsize\ttfamily,
+ commentstyle=\itshape,
+ keywordstyle=\bfseries,
+ ndkeywordstyle=\bfseries,
+}
+
+% inline
+\def\A{%
+ \lstinline[language=alloy,basicstyle=\ttfamily,columns=fixed]}
+
+% paragraph
+\lstnewenvironment{alloy}[1][]{%
+ \lstset{language=alloy,
+ floatplacement={tbp},captionpos=b,
+ xleftmargin=8pt,xrightmargin=8pt,basicstyle=\ttfamily,#1}}{}
+
+% paragraph from file
+\newcommand{\alloyfile}[1]{
+ \lstinputlisting[language=alloy,%
+ frame=lines,xleftmargin=8pt,xrightmargin=8pt,basicstyle=\ttfamily,columns=fixed]{#1}
+}
\ No newline at end of file
diff --git a/3.Integration Test Plan Document/settings/mychapterheadings.sty b/3.Integration Test Plan Document/settings/mychapterheadings.sty
new file mode 100644
index 0000000..5959008
--- /dev/null
+++ b/3.Integration Test Plan Document/settings/mychapterheadings.sty
@@ -0,0 +1,33 @@
+\usepackage[usename]{xcolor}
+
+% Titoli di capitolo con numerazione
+\def\@makechapterhead#1{%
+ \vspace*{6\p@}%
+ {\parindent \z@ \reset@font
+ %\thickhrulefill
+ \par\nobreak
+
+ {\color{gray} \bfseries \fontsize{60}{65}\selectfont \thechapter}
+ {\sffamily \hspace{1em} \huge #1}
+
+ \par\nobreak
+ \interlinepenalty\@M
+ %\hrule
+ \vspace*{10\p@}%
+ \vskip 30\p@
+ }}
+
+% Titoli capitolo senza numerazione (e.g. Indice)
+\def\@makeschapterhead#1{%
+ \vspace*{30\p@}%
+ {\parindent \z@ \reset@font
+ %\thickhrulefill
+ \par\nobreak
+ {\sffamily \huge #1}
+ \par\nobreak
+ \interlinepenalty\@M
+ %\hrule
+ \vspace*{10\p@}%
+ \vskip 30\p@
+ }}
+
diff --git a/3.Integration Test Plan Document/settings/theme.tex b/3.Integration Test Plan Document/settings/theme.tex
new file mode 100644
index 0000000..bbadbce
--- /dev/null
+++ b/3.Integration Test Plan Document/settings/theme.tex
@@ -0,0 +1,44 @@
+%% STILE DELLE INTESTAZIONI %%
+
+\pagestyle{fancy}
+\renewcommand{\chaptermark}[1]{\markboth{#1}{}} % aggiungi \thechapter.\ per anche il numero capitolo
+%\renewcommand{\sectionmark}[1]{\markright{#1}} % titoli di sezione
+\fancyhf{}
+\fancyhead[RE,RO]{\small\thepage}
+\fancyhead[LE,LO]{\small\em\leftmark} % \leftmark = 2.TitoloCapitolo, \rightmark = TitoloSezione
+%\fancyhead[LO]{\small\em\rightmark} % LO = Left Odd, RO = Right Odd, LE = Left Even, RE = Right Even
+\fancypagestyle{plain}{ % titolo di sezione e simili
+ \fancyhf{} % remove everything
+ \renewcommand{\headrulewidth}{0pt} % remove lines as well
+ \renewcommand{\footrulewidth}{0pt}
+}
+
+%% Stile dei titoli di capitolo %%
+\makeatletter
+\def\thickhrulefill{\leavevmode \leaders \hrule height 0.7ex \hfill \kern \z@}
+\def\@makechapterhead#1{%
+ \vspace*{10\p@}%
+ {\parindent \z@ \centering \reset@font
+ %\thickhrulefill
+ \par\nobreak \vspace{3\p@}
+ {\huge \bfseries \sffamily \strut \thechapter.\ #1}\par\nobreak
+ \interlinepenalty\@M
+ \hrule
+ \vspace*{10\p@}%
+ \vskip 30\p@
+ }}
+
+\def\@makeschapterhead#1{%
+ \vspace*{10\p@}%
+ \vspace*{10\p@}%
+ {\parindent \z@ \centering \reset@font
+ %\thickhrulefill
+ \par\nobreak \vspace{3\p@}
+ {\huge \bfseries \sffamily \strut #1}\par\nobreak
+ \interlinepenalty\@M
+ \hrule
+ \vspace*{10\p@}%
+ \vskip 30\p@
+ }}
+
+
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..78d120b
--- /dev/null
+++ b/README.md
@@ -0,0 +1 @@
+https://etherpad.wikimedia.org/p/ingdaje2