You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EZElectronics (read EaSy Electronics) is a software application designed to help managers of electronics stores to manage their products and offer them to customers through a dedicated website. Managers can assess the available products, record new ones, and confirm purchases. Customers can see available products, add them to a cart to buy them, see the history of their past purchases, leave reviews of the products they have purchased, and see the reviews of the available products. Admins can assess the status of the system and manage data through delete operations.
Stakeholders
Stakeholder name
Description
Customer
User of the application who buys the available products
Manager
User of the application who handles the store by registering products
Admin
User of the application who handles the system and checks that everything runs without issues
Developer
Person who develops and maintains the application
Context Diagram and interfaces
Context Diagram
Interfaces
Actor
Logical Interface
Physical Interface
Customer
GUI
PC
Manager
GUI
PC
Admin
GUI
PC
Unlogged User
GUI
PC
Functional and non functional requirements
Functional Requirements
ID
Name
FR1
Manage account
FR1.1
Login
FR1.2
Logout
FR1.3
Create a new user account
FR2
Manage users
FR2.1
Show the list of all users
FR2.2
Show the list of all users with a specific role
FR2.3
Show the information of a single user
FR2.4
Update the information of a single user
FR2.5
Delete a single non Admin user
FR2.6
Delete all non Admin users
FR3
Manage products
FR3.1
Register a set of new products
FR3.2
Update the quantity of a product
FR3.3
Sell a product
FR3.4
Show the list of all products
FR3.4.1
Show the list of all available products
FR3.5
Show the list of all products with the same category
FR3.5.1
Show the list of all available products with the same category
FR3.5
Show the list of all products with the same model
FR3.5.1
Show the list of all available products with the same model
FR3.7
Delete a product
FR3.8
Delete all products
FR4
Manage reviews
FR4.1
Add a new review to a product
FR4.2
Get the list of all reviews assigned to a product
FR4.3
Delete a review given to a product
FR4.4
Delete all reviews of a product
FR4.5
Delete all reviews of all products
FR5
Manage carts
FR5.1
Show the information of the current cart
FR5.2
Add a product to the current cart
FR5.3
Checkout the current cart
FR5.4
Show the history of the paid carts
FR5.5
Remove a product from the current cart
FR5.6
Delete the current cart
FR5.7
See the list of all carts of all users
FR5.8
Delete all carts
Access Rights
FR
Unlogged
Customer
Manager
Admin
FR1.1
✔️
❌
❌
❌
FR1.2
❌
✔️
✔️
✔️
FR1.3
✔️
❌
❌
❌
FR2.1
❌
❌
❌
✔️
FR2.2
❌
❌
❌
✔️
FR2.3
❌
✔️ (its own user)
✔️ (its own user)
✔️ (any user)
FR2.4
❌
✔️ (its own user)
✔️ (its own user)
✔️ (any user)
FR2.5
❌
✔️ (its own user)
✔️ (its own user)
✔️ (any user)
FR2.6
❌
❌
❌
✔️
FR3.1
❌
❌
✔️
✔️
FR3.2
❌
❌
✔️
✔️
FR3.3
❌
❌
✔️
✔️
FR3.4
❌
❌
✔️
✔️
FR3.4.1
❌
✔️
✔️
✔️
FR3.5
❌
❌
✔️
✔️
FR3.5.1
❌
✔️
✔️
✔️
FR3.6
❌
❌
✔️
✔️
FR3.6.1
❌
✔️
✔️
✔️
FR3.7
❌
❌
✔️
✔️
FR3.8
❌
❌
✔️
✔️
FR4.1
❌
✔️
❌
❌
FR4.2
❌
✔️
✔️
✔️
FR4.3
❌
✔️ (their review)
❌
❌
FR4.4
❌
❌
✔️
✔️
FR4.5
❌
❌
✔️
✔️
FR5.1
❌
✔️
❌
❌
FR5.2
❌
✔️
❌
❌
FR5.3
❌
✔️
❌
❌
FR5.4
❌
✔️
❌
❌
FR5.5
❌
✔️
❌
❌
FR5.6
❌
✔️
❌
❌
FR5.7
❌
❌
✔️
✔️
FR5.8
❌
❌
✔️
✔️
Non Functional Requirements
ID
Type (efficiency, reliability, ..)
Description
Refers to
NFR1
Efficiency
The application should have a response time lower than 0.5 sec.
FR1,FR2,FR3,FR4,FR5
NFR2
Usability
At least 95% of average users (no computer professionals with more than 1 year of experience of using PC) can use the application within 1 hour, with no training
FR1,FR2,FR3,FR4,FR5
Use case diagram and use cases
Use case diagram
Use Cases
Use Case 1, Login (UC1)
Actors Involved
User
Precondition
User U is not logged in
Post condition
U is logged in
Nominal Scenario
Scenario 1.1
Variants
None
Exceptions
Scenario 1.2, 1.3, 1.4
Scenario 1.1
Scenario 1.1
Successful Login
Precondition
U is registered
Post condition
U is logged in
Step#
Description
1
System: Ask for username, password
2
User: Provide username, password.
3
System: Read username, password.
4
System: Given username, find the user.
5
System: Retrieve password, compare with the one provided. Passwords match, user is auhorized
Scenario 1.2
Scenario 1.2
Wrong password
Precondition
U is registered
Post condition
U not logged in
Step#
Description
1
System: Ask username password.
2
User: Provide username, password.
3
System: Read username, password.
4
System: Given username, find the user.
5
System: Retrieve password, compare with the one provided. Passwords do not match, user is not auhorized
Scenario 1.3
Scenario 1.3
User not registered
Precondition
U is not registered
Post condition
User not logged in
Step#
Description
1
System: Ask username password.
2
User: Provide username, password.
3
System: Read username, password. Check cookie, the user is not logged in.
4
System: Given username, find the user. User is not found. User not authorized
Scenario 1.4
Scenario 1.4
User already logged in
Precondition
U is registered
Post condition
U is logged in
Step#
Description
1
System: Ask username password.
2
User: Provide username, password.
3
System: Read username, password. The user is already logged in.
4
System: Return an error message
Use Case 2, Logout (UC2)
Actors Involved
User
Precondition
User U exists
Post condition
U is not logged in
Nominal Scenario
Scenario 2.1
Variants
Exceptions
Scenario 2.2
Scenario 2.1
Scenario 2.1
Logout
Precondition
U is logged in
Post condition
U not logged in
Step#
Description
1
User: Ask to logout
2
System: Check that U is logged in
3
System: remove user authorization for U
4
System: Show a logout confirmation message.
Scenario 2.2
Scenario 2.2
User already logged out
Precondition
U is not logged in
Post condition
U is not logged in
Step#
Description
1
User: Ask to logout
2
System: Check that U is logged in
3
System: U hasn't performed login yet. Show an error message.
System: Check that all parameters are filled. At least one parameter is empty. Provide error message.
Use Case 4, View users (UC4)
Actors Involved
User
Precondition
None
Post condition
Information about at least one user is seen
Nominal Scenario
Scenario 4.1
Variants
Scenario 4.3, Scenario 4.4
Exceptions
Scenario 4.2, Scenario 4.5
Scenario 4.1
Scenario 4.1
View the information of one user
Precondition
User U exists
Postcondition
Information of User U is visualized
Step#
Description
1
User: Ask to see information of User U
2
System: Ask for U.username
3
User: Provide the username
4
System: Retrieve information of User U
5
System: Display information of User U
Scenario 4.2
Scenario 4.2
Ask to view information of a user who does not exist
Precondition
User U does not exist
Postcondition
An error is shown
Step#
Description
1
User: Ask to see information of User U
2
System: Ask for U.username
3
User: Provide the username
4
System: Try to retrieve information of U. U is not found
5
System: Notify that User U does not exist
Scenario 4.3
Scenario 4.3
View the information of all users
Precondition
None
Postcondition
Information of all users is shown
Step#
Description
1
User: Ask to see information of all users
2
System: Retrieve information of all users
3
System: Show information of all users
Scenario 4.4
Scenario 4.4
View the information of all users with a specific role (Customer or Manager)
Precondition
At least one user U with role R exists
Postcondition
Information of all users with the requested role is shown
Step#
Description
1
User: Ask to see information of all users with role R
2
System: Ask for R
3
User: Provide R
4
System: Retrieve information of all users with user.role = R
5
System: Show information of all users with user.role = R
Scenario 4.5
Scenario 4.5
Ask to view information of users with a role that does not exist
Precondition
None
Postcondition
An error is shown
Step#
Description
1
User: Ask to see information of all users with role R
2
System: Ask for R
3
User: Provide R. R is neither "Customer" nor "Manager"
4
System: Display an error explaining that only "Customer" and "Manager" are allowed roles
Use Case 5, Delete one user (UC5)
Actors Involved
User
Precondition
At least one user is registered
Postcondition
The requested user is deleted
Nominal Scenario
Scenario 5.1
Variants
None
Exceptions
Scenario 5.2
Scenario 5.1
Scenario 5.1
Delete one user
Precondition
User U exists
Postcondition
User U is deleted
Step#
Description
1
User: Ask to delete User U
2
System: Ask for U.username
3
User: Provide the username
4
System: Retrieve information about U. U is found
5
System: Delete the user
Scenario 5.2
Scenario 5.2
Try to delete a user that does not exist
Precondition
User U does not exist
Postcondition
An error is shown
Step#
Description
1
User: Ask to delete User U
2
System: Ask for U.username
3
User: Provide the username
4
System: Retrieve information about U. U is not found
5
System: Notify User U does not exist
Use Case 6, Register products (UC6)
Actors Involved
Manager
Precondition
Manager M exists
Postcondition
New products are registered
Nominal Scenario
Scenario 6.1
Variants
Scenario 6.4
Exceptions
Scenario 6.2, 6.3, 6.5
Scenario 6.1
Scenario 6.1
Register a new product
Precondition
M is logged in, P.model does not exist
Postcondition
P.model recorded
Step#
Description
1
Manager: Ask to register a new product P
2
System: Ask forP.model, P.category, P.sellingPrice, P.details, P.quantity, and arrivalDate
3
Manager: Provide the requested information
4
System: Validate the input parameters. All parameters are valid
5
System: Create product P. The available quantity is set to P.quantity
Scenario 6.2
Scenario 6.2
Try to register a product that already exists
Precondition
M is logged in, P.model exists
Postcondition
An error is shown
Step#
Description
1
Manager: Ask to register Product P2
2
System: Ask for product P2.model, P2.category, P2.sellingPrice, P2.details, P2.model, and P2.arrivalDate
3
Manager: Provide the requested information, P2.model == P.model
4
System: Validate the input parameters.
5
System: Display an error stating that P2.model is already in use
Scenario 6.3
Scenario 6.3
Try to register a product with invalid input parameters
Precondition
M is logged in
Postcondition
An error is shown
Step#
Description
1
Manager: Ask to register Product P
2
System: Ask for product P.model, P.category, P.sellingPrice, P.details, P.quantity, and P.arrivalDate
3
Manager: Provide the requested information
4
System: Validate the input parameters. At least one parameter is invalid (e.g. empty string, category is not "Smartphone", "Laptop", "Appliance", quantity = 0)
5
System: Display an error explaining the issue
Scenario 6.4
Scenario 6.4
Update the quantity of a product
Precondition
M is logged in, P.model exists, n >= 0
Postcondition
P.quantity (post)= P.quantity (pre) + n
Step#
Description
1
Manager: Ask to increase the quantity of P
2
System: Ask for P.model, the increase in quantity and the date of increase
3
Manager: Provide the requested information
4
System: Validate input parameters. P exists, the quantity is a valid number, the date is valid. Increase P's quantity
5
System: Display a message confirming the increase in quantity
Scenario 6.5
Scenario 6.5
Try to increase the quantity of a product that does not exist
Precondition
Manager M exists and is logged in, P.model does not exist
Postcondition
An error is shown
Step#
Description
1
Manager: Ask to increase the quantity of product P
2
System: Ask for P.model, the increase in quantity, and the date of increase
3
Manager: Provide the requested parameters
4
System: Validate input parameters. P does not exist
5
System: Display an error message explaining that P does not exist
Use Case 7, Sell a product (UC7)
Actors Involved
Manager
Precondition
Manager M exists, a product is purchased in the store
Postcondition
A product's available quantity is reduced
Nominal Scenario
Scenario 7.1
Variations
None
Exceptions
Scenario 7.2, Scenario 7.3
Scenario 7.1
Scenario 7.1
Sell a product after an in-store purchase
Precondition
M is logged in, P.model exists, P.quantity >=Q, Q>0
Postcondition
P's available quantity is reduced
Step#
Description
1
Manager: Ask to sell P
2
System: Ask for P.model and the sold quantity Q
3
Manager: Provide P.model and Q
4
System: Validate input parameters. P exists and P.quantity >= Q
5
System: Reduce P.quantity by Q. Display a message confirming the sale
Scenario 7.2
Scenario 7.2
Try to sell a product that does not exist
Precondition
M is logged in, P.model does not exist
Postcondition
An error is shown
Step#
Description
1
Manager: Ask to sell product P
2
System: Ask for P.model
3
Manager: Provide P.model
4
System: Retrieve information about P.
5
System: Display an error explaining that P.model does not represent a product
Scenario 7.3
Scenario 7.3
Try to sell an unavailable product
Precondition
M is logged in, Product P.model, P.quantity = 0, Q >0
Postcondition
An error is shown
Step#
Description
1
Manager: Ask to sell Q instances of P
2
System: Ask for P.model and Q
3
Manager: Provide P.model and Q
4
System: Retrieve information about P. P is not available (P.quantity = 0)
5
System: Display an error explaining that P is not available