Authors: Brignone Giovanni, Daniele Noemi
Date: 24/03/2020
Version: 1
Change history
EZGas is a crowdsourcing service that allows users to:
collect prices of fuels in different gas stations
locate gas stations in an area, along with the prices they practice.
Stakeholder name
Description
Administrator
Check data correctness
Customer
They are interested in gas stations data and they generate the data
Context Diagram and interfaces
left to right direction
actor Administrator as a
actor Customer as b
actor OpenStreetMaps as c
a -- (EZGas )
b -- (EZGas )
(EZGas ) -- c
Actor
Logical Interface
Physical Interface
Administrator
GUI
Screen, keyboard, Internet connection
Customer
GUI
Screen, keyboard, Internet connection
Customers need to find the nearest gas station with the lowest price.
Customers help each other sharing prices offered by gas stations they are in.
Administrator wants to check data inserted by customers is reliable, before making it available to other users.
Functional and non functional requirements
ID
Description
FR1
Share current gas station fuel price
FR2
Review data inserted by customers
FR3
Set search filters such as distance and price
FR4
Find current location
FR5
Fetch gas stations locations and their current prices satisfying search filters
FR6
Display list of gas stations on the map
Non Functional Requirements
ID
Type
Description
Refers to
NFR1
Usability
Application should be used with no training by customers
FR1, FR3-6
NFR2
Usability
Application should be used with 2 hours training by administrator
FR2
NFR3
Performance
FR1-3 should complete in < 0.5 sec; FR4-6 should complete in < 3 sec
All FR
NFR4
Portability
The application runs on web browsers and Android/iOS smartphones
All FR
NFR5
Privacy
Data should be uploaded anonymously
FR1
NFR6
Localisation
Decimal numbers use . (dot) as decimal separator
NFR7
Localisation
Fuel prices are expressed in €/l (euros per liter)
Scenarios, use case diagram and use cases
Scenario 1: Update gas station fuel's price - success
Scenario ID: SC1
Corresponds to FR1-2
Description
User shares updated data of a gas station
Precondition
Gas station S current price has changed
Postcondition
Gas station price and last update time are updated
Step#
Step description
1
Customer C selects gas station S
2
Customer C inserts current fuel price
3
After being notified administrator checks new data reliability
4
Accepted data is used to update gas station S data
5
Updated data is available to all users
Scenario 2: Update gas station fuel's price - fail
Scenario ID: SC2
Corresponds to FR1-2
Description
User shares updated data of a gas station
Precondition
Gas station S current price has changed
Postcondition
Gas station price and last update time are updated
Step#
Step description
1
Customer C selects gas station S
2
Customer C inserts current fuel price
3
After being notified administrator checks new data reliability
4
Administrator discards data (possible causes: inconsistency with previous data, wrong data... )
Scenario 3: User looks for a gas station - success
Scenario ID: SC3
Corresponds to FR3-6
Description
Customer C searches for a gas station S
Precondition
Customer C has a device with GPS module
Postcondition
Customer C gets the list of available gas stations according to the filters
Step#
Step description
1
Customer C sets search filters S
2
Customer C location is retrieved
3
Gas stations are searched for, according to customer location and filters
4
Customer C gets the list S of corresponing stations
5
The list S is displayed on the map
Scenario 4: User looks for a gas station - empty list
Scenario ID: SC3
Corresponds to FR3-6
Description
Customer C searches for a gas station S
Precondition
Customer C has a device with GPS module
Postcondition
Customer C gets the list of available gas stations according to the filters
Step#
Step description
1
Customer C sets search filters S
2
Customer C location is retrieved
3
Gas stations are searched for, according to customer location and filters
4
The result list S is empty
5
Repeat steps from 1 to 3, changing filters
left to right direction
actor Administrator as a
actor Customer as b
actor OpenStreetMaps as c
skinparam packageStyle rectangle
rectangle system {
b --> (UC1 - Share current gas station \n fuel price )
b --> (UC2 - Get list of gas stations )
(UC1 - Share current gas station \n fuel price ) .> (FR1 Share current gas station \n fuel price ) :include
(FR1 Share current gas station \n fuel price ) --> a
(FR2 Review data inserted \n by customers ) <-- a
(UC1 - Share current gas station \n fuel price ) .> (FR2 Review data inserted \n by customers ) :include
(UC2 - Get list of gas stations ) .> (FR3 Set search filters such \n as distance and price ) :include
(UC2 - Get list of gas stations ) .> (FR4 Find current location ) :include
(UC2 - Get list of gas stations ) .> (FR5 Fetch gas stations locations \n and their current prices \n satisfying search filters ) :include
(UC2 - Get list of gas stations ) .> (FR 6 - Display list of gas stations on the map ) :include
c --> (FR 6 - Display list of gas stations on the map )
}
Use case 1, UC1: SC1-2 Share current gas station fuel price
Actors Involved
Customer and administrator
Precondition
Gas station S exists, customer C exists
Post condition
New data D.price = new_price
D.last_update = curr_time
D.station = S.id
Nominal Scenario
Customer selectes gas station S, inserts fuel price new_price. curr_time is automatically retrieved from device. Administrator is notified about the new data availability and accept or discard it
Variants
Use case 2, UC2: SC3-4 Get list of gas stations
Actors Involved
Customer
Precondition
Customer C exists
Post condition
List S of gas stations
Nominal Scenario
Customer C inserts filters about distance and price, and the application returns the list of gas stations satisfying the filters, using his current user's position
Variants
class EZGas
class Customer {
+ location
}
class Administrator {
}
class Station {
+ id
+ price
+ last_updated
+ location
}
class Data {
+ station
+ price
+ time
}
class Map {
}
EZGas -- "*" Customer
EZGas -- "*" Administrator
EZGas -- "*" Station
Customer -- "*" Data : creates >
Station "1" -- Data : refers to <
Map -- "*" Station
As a stand-alone application only one node is needed.
artifact "EZGas application" as a
node "Personal Computer" as n
node "Smartphone" as s
a -- n
a -- s