Skip to content

Latest commit

 

History

History
252 lines (186 loc) · 10.2 KB

REQ_s269796.md

File metadata and controls

252 lines (186 loc) · 10.2 KB

Official Requirements Document

Authors: Vera Altamore

Date: 27/03/2020

Version: 1

Change history

Version Changes

Contents

Abstract

The car drivers need to refuel. The entire territory is divided in areas where there are different gas stations at which drivers can refuel. The price of fuel is different at each gas station and the car drivers want to find the gas station in the own area with the lowest price. To solve this problem is implemented EZGas, 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. EZGas is supported by a web application (accessible both via smartphone or PC). The collection of prices in different gas station is at the beginning initializated with data found on the Internet mixed with data sent by the gas station owners and it is updated by the users in runtime. The localization of the gas station and other addictional funtionalities are supported by other service like Google maps.

Stakeholders

Stakeholder name Description
Users Use the application directly. They are interested in updating the prices of fuel and to find the lowest price in the area. Users can be car drivers or gas station owners.
Maps service Provides the maps to locate the gas stations. A map service can be Google maps.

Context Diagram and interfaces

Context Diagram

left to right direction
actor User as u
actor MapService as ms
a --> (EzGas)
(EzGas) --> ms

Interfaces

Actor Logical Interface Physical Interface
User GUI Screen, keyboard, smartphone, Internet connection

Stories and personas

John is a car driver and every morning, before going to work, he always checks the fuel level in his car. When it's necessary a refuel, he wants to do quickly because he can't arrive late at work but he wants also to save money. So when he get in the car he opens the EZgas application on his smartphone to find the gas stations on the way for work with the lowest price. He would like to know not only the gas station with the lowest price but also the distance from it in order to know if he can arrive to that gas station with the remaining fuel.

Bob is the owner of a gas station and every morning if there is a difference in the price of fuel he update the sign in the station with the new price, then he update the price in the EZgas service from the PC in his office.

Alice is a truck driver and during her long trip she stop sometimes in gas stations for a short break. During these stops she can read the actual price of the fuel in that gas station and update it on the web service through her smartphone.

To verify the correctness of the updated price, because there is no way to verify the declatation of the user, an update is done only if at least 3 people agree about the the same price.

Functional and non functional requirements

Functional Requirements

ID Description
FR1 Management of price
FR1.1 Record the price of fuel at each gas station
FR1.2 Record the reportings of users about the modification of price
FR1.3 Record the number of reportings about a specific gas station to validate the update of price
FR1.4 Validate the update of price
FR2 Management of position
FR2.1 Take the position of a user and show all the gas stations around him.
FR2.2 Calculate the distance between the user and each gas station in his area
FR3 Management of types of users
FR3 Filter the gas station based on the characteristics chosen by the user: type of fuel, type of assistance, type of payment.

Non Functional Requirements

ID Type (efficiency, reliability, .. see iso 9126) Description Refers to
NFR1 Usability Application should be used with no training All FR
NFR2 Performance All functions should complete in < 0.5 sec All FR except FR1.4
NFR3 Portability The application is based on web so it is device independent. It is accessible both via smartphone or PC with the only condiction of a stable Internet connection. All FR
NFR5 Reliability The reliability of the service is based on the activity and declarations of the users. Only for FR1
NFR6 Maintainability Once the service is launched, the users themselves maintain it functional updating the prices.

Use case diagram and use cases

Use case diagram

left to right direction
actor User as u
(FR1 Management of price) <|-- (FR1.1 Record the price of fuel at each gas station)
(FR1 Management of price)<|-- (FR1.2 Report change in price)
(FR2 Management of position) <|-- (FR2.1 Check the gas station in the area)
(FR2 Management of position) <|--(FR2.2 Calculate the distance)
(FR2.1 Check the gas station in the area)--|> (Check the gas station with the lowest price in the area) :include
actor MapService as ms
(FR2.1 Check the gas station in the area)--|> (Check the nearest gas station) :include
actor MapService as ms

(FR1.2 Report change in price) -- (FR1.3   | Check the  number of reportings )

(FR1.3   | Check the  number of reportings ) -- ( FR1.4   | Validate the update of price)

u -->(FR1.2 Report change in price)
u --> (FR2.1 Check the gas station in the area)
u -->  (FR3.1 Filter the gas station)
(FR2 Management of position) --> ms

Use Cases

Use case 1, UC1 - FR1.1 Record the price of fuel at each gas station

Actors Involved User
Precondition The gas station GS exists and works, User u can know the price of the fuel, the GS sells the fuel F, the fuel F has no price yet
Post condition F.price = price
F.pricepre == 0, F.pricepost != 0
Nominal Scenario The first user arrives in a gas station GS, see the price of a fuel F and set the price of that fuel
Variants

Use case 2, UC2 - FR1.2 Report change in price

Actors Involved User
Precondition The gas station GS exists and works, User u can know the price of the fuel, the GS sells the fuel F, the fuel F has an incorrect prive
Post condition F.price < price
F.pricepre != F.pricepost
Nominal Scenario The user arrives in a gas station GS, see the price of a fuel F and if it different from the actual one sends the new price to the service. After a threashold of notification the price is updated
Variants The notification does not pass the threshold.

Use case 3, UC3 - FR2.1 Check the gas station in the area

Actors Involved Map Service
Precondition The Gas GS station exists, the Map service works
Post condition GS.position = coordinates
GS.positionpre = NULL, GS.positionpost = coordinates
Nominal Scenario A query is sent to the external Map service and the positions of the gas stations are returned
Variants

Use case 4, UC4 - FR3.1 Filter the gas stations

Actors Involved User
Precondition The gas GS station exists, there are no filters on the type of gas station
Post condition GS.Fuel.type = typeFuel && GS.type_of_payment = payment && GS.type_of_assistance = assistance
GS.Fuel.type = all && GS.type_of_payment = all && GS.type_of_assistance = all
Nominal Scenario The user wants to find only the gas stations with specific characteristics
Variants

Relevant scenarios

Scenario 1

Scenario ID: SC1 Corresponds to UC2
Description Someone change the price of the fuel at the gas station GS
Precondition The user goes to the gas station and the price on the web service does not correspond to the real one
Postcondition The price of the fuel is updated
Step# Step description
1 User goes to the gas station
2 User selects a type of fuel F
3 User see that the price of the fuel F is incorrect
4 User notificates the new price of the fuel F at the gas station GS
5 If the system receives a number of notification larger than the threshold the price is updated

Scenario 2

Scenario ID: SC2 Corresponds to UC2
Description The number of notificaiton is smaller than the threshold
Precondition The user goes to the gas station and the price on the web service does not correspond to the real one
Postcondition The price of the fuel is not updated
Step# Step description
1 User goes to the gas station
2 User selects a type of fuel F
3 User see that the price of the fuel F is incorrect
4 User notificates the new price of the fuel F at the gas station GS
5 If the number of notification is smaller than the threshold the price is not updated and will remain like that until new notification will arrive.

Glossary

class EzGas
class Driver {
+ name
+ surname
}


class GasStation {
+ name
+ Position
+ Fuel
+ type_of_payment
+ type_of_assistance
}

class Fuel {
+ type
+ price
}

class Position {
+ coordinates
+ actual_distance
}

class Update {
+ N_update
+ GasStation
+Fuel
}


EzGas -- "*" Driver
EzGas -- "*" GasStation
EzGas -- "*" Update
GasStation -- "*" Fuel
GasStation -- "1"Position