p2 Android Application Use Case Document

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

Anthony Matricia

Project 02: DoorwayDashes


CST 338 Spring 2023 Section 40

DoorwayDashes: Because driving is so much work.


This Android application functions as a food-delivery service. Users can create an account/login and
search for local restaurants, fast-food chains, and stores. The app allows users to browse menus, place
orders, view order history, and cancel orders. Admins can create new items or alter the stock of existing
items.

Table of contents
Initial Layout 2
Use Case Model 3
Create Account - (New) User 3
View Existing Users - Admin 4
Entity Relationship Diagram (ERD) 5
Use Case 01: Predefined Users 6
Use Case 02: Sign Up 7
Use Case 03: Add a user 8
Use Case 04: Delete a user 9
Use Case 05: Place an Order 10
Use Case 06: View Order History 11
Use Case 07: Cancel Order 12
Use Case 08: User Authentication 13
Use Case 09 Alternate Flow 1: Add a User that Already Exists 14
Use Case 10 Alternate Flow 2: Delete a User that DNE 15
Use Case 11 Alternate Flow 3: Login with Invalid Credentials 16
Use Case 12 Alternate Flow 4: Sign Up with invalid credentials 17
Initial Layout
Use Case Model

Create Account - (New) User


{Sign Up}
1. Use case begins when user presses Sign Up button

{Enter Username}
2. User enters a username into the username textbox
3. Application validates that username does not already exist
a. If it does, when the user presses the sign up button, display an error and request user to
either login or enter a different username
b. If it does not, proceed
{Enter Password}
4. User enters a password in the initial password textbox
5. User enters a password in the confirmation textbox
6. Application validates that initial password and password confirmation match
a. If they do not, when the user presses the sign up button, display an error message
telling the user that the passwords do not match
b. If they do, proceed
{Press Sign Up}
7. User presses Sign Up button
a. Machine validates all provided fields and stores the information in the database
View Existing Users - Admin
{Sign In}
1. Use case begins when admin begins entering username and password
2. Press sign in button
a. If admin entered login information that does not exist, application will display error
message
b. If admin entered login information of a standard user, application will log them in as said
standard user
c. If admin entered valid admin login information, proceed as admin
{Enter Admin Menu}
3. Admin presses the Admin button
{View Existing Users}
4. Admin presses view existing items button
5. Application displays existing users
Entity Relationship Diagram (ERD)
Use Case 01: Predefined Users

1. Force quit the application1


2. Login as testuser1
3. Display the username 'testuser1'
4. Logout
5. Login as admin2
6. Display the username 'admin2'
7. Display the admin button

This use case passes if all of these conditions are met. It fails otherwise.

1
How to force quit an application in Android:
https://www.digitaltrends.com/mobile/how-to-force-close-apps-android/
Use Case 02: Sign Up

1. Press Sign Up prompt


2. Enter valid sign up credentials
a. Sign Up Successfully and bring user to Landing page / main menu
3. Press Create Account
4. Validate that Landing page was successfully reached
5. Logout
6. Login with account that was created
Use Case 03: Add a user

1. Add a username to the database


2. Add corresponding password to the database
3. Force quit the application2
4. Attempt to login as the newly added user
5. Display the username and password of the user we just added
6. Validate that they are correct

2
How to force quit an application in Android:
https://www.digitaltrends.com/mobile/how-to-force-close-apps-android/
Use Case 04: Delete a user

1. Delete the user’s username and password from the database


2. Force quit the application
3. Attempt to login as the deleted user
4. Validate that it failed
5. Attempt to create a new user with the previously deleted credentials
6. Validate that it was successful
Use Case 05: Place an Order

1. Sign in with an existing account or Create a new account.


2. Press Place Order
3. Search for an establishment
4. Validate that accurate establishment names show up
5. Select an Establishment
6. Press View Menu
7. Search for an Item or Items
8. Add each item to cart by pressing add to cart
9. Checkout with all items
10. Validate that all items appear in cart with corresponding descriptions, costs, values, etc.
11. Press Place Order
12. Validate that “Thank you for placing an order” screen appears.
13. View order history and validate that the order is there.
Use Case 06: View Order History

1. Sign in with an existing account or Create a new account.


2. Place an Order
3. Return to Main Menu
4. Press Order History
5. Validate that all past orders made appear in chronologically sorted order from newest to oldest
descending downward.
Use Case 07: Cancel Order

1. Sign in with an existing account or Create a new account.


2. Place an Order
3. Return to Main Menu
4. View Order History
5. Validate that the order is there
6. Press back
7. Press Cancel Order
8. Select the order to cancel from the dropdown menu
9. Press Cancel
10. Return to Main Menu
11. View order history and validate that the canceled order is no longer there.
Use Case 08: User Authentication

1. Enter valid login credentials


a. Login Successfully and bring user to Landing page / main menu
2. Enter invalid sign up credentials
a. No username or password provided -> “Enter username and password”
b. No username provided -> “Enter username”
c. No password provided -> “Enter your password”
d. Username of existing account -> “Account already exists.”
e. Invalid password provided -> “Password must contain…”
3. Enter valid sign up credentials
a. Sign Up Successfully and bring user to Landing page / main menu
4. Log out
a. Press the Sign Out button on the main menu
b. Validate that the user has been signed out and brought to the main menu
Use Case 09 Alternate Flow 1: Add a User that Already Exists

1. Login as admin
2. Press admin button
3. Press add user button
4. Add a username that already exists to the database
5. Validate that a message saying “User already exists” appears.
6. Force quit the application3
7. Reopen application
8. Login as admin
9. Press admin button
10. Press View existing users
11. Validate that the user we attempted to create only exists in one instance

3
How to force quit an application in Android:
https://www.digitaltrends.com/mobile/how-to-force-close-apps-android/
Use Case 10 Alternate Flow 2: Delete a User that DNE

1. Login as admin
2. Press admin button
3. Press view existing users
4. Choose a username that does not exist in the existing users
5. Return to admin menu
6. Press delete user button
7. Delete the username that does not exist in the database
8. Validate that a message saying “User does not exist” appears.
9. Force quit the application4
10. Reopen application
11. Login as admin
12. Press admin button
13. Press View existing users
14. Validate that the user we attempted to delete still does not exist and no other errors occurred
15. Attempt to create a new user with the previous credentials
16. Login as that user and validate that it was successful

4
How to force quit an application in Android:
https://www.digitaltrends.com/mobile/how-to-force-close-apps-android/
Use Case 11 Alternate Flow 3: Login with Invalid Credentials

1. Enter invalid login credentials


a. No username or password provided -> “Enter username and password”
b. No username provided -> “Enter username”
c. No password provided -> “Enter your password”
d. Username of nonexistent account -> “Account does not exist.”
e. Incorrect password provided -> “Incorrect Password.”
Use Case 12 Alternate Flow 4: Sign Up with invalid credentials

1. Enter invalid sign up credentials


a. No username or password provided -> “Enter username and password”
b. No username provided -> “Enter username”
c. No password provided -> “Enter your password”
d. Username of existing account -> “Account already exists.”
e. Invalid password provided -> “Password must contain…”

You might also like