Project 02 Part 01 Use Case Documnet 2

You might also like

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

Stacy Kirchner

Project 02: Android App


CST 338 Fall 2022 Online

Android Application: Workout Store


The application is selling personal workout equipment, like dumbbells, treadmills, resistance bands, and
other small and large equipment.
The administrator can add equipment to the store, add a description and price of the item, remove
items, and set promo codes.

Please mark each use case as 'pass' Or 'fail'. The use case passes if it does what it intended to do. It
fails if it does not. See the example below for more information.

Table of contents
Database Diagram 3
3

Use Case 01: Predefined Users 4


pass 4

Use Case 02: Persistence 5


pass 5

Use Case 03: Add a user 6


pass 6

Use Case 04: Delete a user 7


pass 7

Use Case 05: Add an item 8


pass 8

Use Case 06: Modify an item 9


fails 9

Use Case 07: Delete an item 10


pass 10

Use Case 08: Update password 11


pass 11

Use Case 09: Submit order 12


fail 12
Use Case 10: Cancel order 13
fail 13

Use Case 11: Edit user information 14


pass 14

Use Case 12: Save item for later 15


fail 15

Use Case 13: Add item to cart 15


fail 16

Use Case 14: Search for an item 16


pass 17

Use Case 15: Delete item from cart 17


fail 18

Use Case 16: Add a promo code 18


fail 19
Database Diagram
Use Case 01: Predefined Users

pass

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 something specific to the admin user.
a. Something like an admin button or a link to edit items.

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

https://youtu.be/g1XRfI1ZbRs?t=4

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

pass

1. Add an item to the database


2. Force quit the application2
3. Show the item added in step 1 is still in the database
4. Change an item in the database
5. Force quit the application
6. Show the item modifications from step 4 have been saved

https://youtu.be/g1XRfI1ZbRs?t=42

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

pass

Primary flow:
1. Click ‘New user’ button
2. Application displays the add user screen
3. User enters a username
4. User enters a password
5. User clicks ‘Create user’
6. User returns to landing page
7. A toast is displayed saying “Account created successfully”
8. Force quit the app
9. Login with the user that was just created
10. Use case ends

Secondary flow:
4. The username entered by user already being used
5. Application displays message “Username is already taken”
6. Use case ends

Secondary flow
5. The password entered by user does not match the criteria for passwords
6. Application displays message “Password must be 8 characters long, numbers and letters only”
7. Use case ends

https://youtu.be/g1XRfI1ZbRs?t=133
Use Case 04: Delete a user

pass

Primary flow:
1. User logins to account for the user that needs to be deleted
2. On user account page, user clicks ‘Delete account’
3. A toast is displayed saying “User has been deleted”
4. User tries to login again using delete username
5. Username should not be found
6. Use case ends

https://youtu.be/g1XRfI1ZbRs?t=186
Use Case 05: Add an item

pass

Primary flow:
1. User logins with admin user information
2. Application goes to admin home page
3. User clicks ‘Add an item’
4. User enters the name of the item, price, quantity, and description of the item.
5. User clicks ‘Submit’
6. A toast is displayed saying “Item has been added”
7. Use case ends

Secondary flow:
5. User enters a name of an item that has already been entered
6. Application displays message “This item is already added”
7. Use case ends

https://youtu.be/g1XRfI1ZbRs?t=207
Use Case 06: Modify an item

fail
Primary flow:
1. User logins with admin user information
2. Application goes to admin home page
3. User clicks “Edit item”
4. User searches for the item that needs to be modified
5. User modifies the name, price, or description of item
6. User clicks ‘Finish’
7. A toast displays message “Item updated”
8. Use case ends

Secondary flow:
6. User edits the name to an existing item name
7. Application displays the message “Sorry, the name of the item is already in the system.”
8. User edits name to a different name
9. User clicks ‘Finish’
10. A toast displays the message “Item updated”
11. Use case ends
Use Case 07: Delete an item

pass

Primary flow:
1. Admin logins with admin user information
2. Application goes to admin home page
3. Admin searches for the desired item that needs to be deleted
4. Admin clicks ‘Delete item’
5. A toast displays message “Item has been deleted”
6. Admin searches for deleted item and toast displays “No item found”
7. Use case ends

https://youtu.be/g1XRfI1ZbRs?t=383
Use Case 08: Update Password
pass

Primary flow:
1. User logins as an existing user
2. On user home page, user clicks ‘Update password”
3. User types in desired new password
4. User clicks ‘Finish’
5. A toast is displayed saying “Password has been updated”
6. Log out of account
7. User logins to account using the new password
8. Use case ends

Secondary flow:
5. The new password does not match the criteria for passwords
6. Application displays message “Password must be 8 characters long, numbers and letters only”
7. User enters another password that does not match criteria.
8. Application returns to user home page
9. Application displays message “Sorry try again”
10. Use case ends

https://youtu.be/g1XRfI1ZbRs?t=249
Use Case 09: Submit Order

fail

Primary flow:

1. User logins as an existing user.


2. User searches for an item
3. User selects desire item
4. User clicks ‘Add item’
5. User clicks ‘View shopping cart’
6. User verifies item and information is correct
7. User clicks ‘Submit Order’
8. A toast displays message saying ‘Order submitted’

Secondary flow:
5. User searches for another item
6. User clicks ‘Add item’
7. User adds more items
8. User clicks “View shopping cart’
9. User verifies items and information is correct
10. User clicks ‘Submit Order’
11. A toast displays message saying ‘Order submitted’

Secondary flow:
7. User added the wrong item to shopping cart
8. User selects the item
9. User clicks ‘delete item from cart’
10. A toast is displayed saying “Item has been removed”

Secondary flow:
7. User information for order is not correct
8. User clicks ‘edit information’
9. User types in the correct information
10. User clicks ‘Ok’
11. User verifies items and information is correct
12. User clicks ‘Submit Order’
13. A toast displays message saying ‘Order submitted’
Use Case 10: Cancel order

fail

Primary flow:
1. User logins as an existing user.
2. User clicks ‘View orders’
3. User finds the desire order that needs to be cancel’
4. User clicks ‘Cancel order’
5. Application displays the message “Are you sure you want to cancel?”
6. User clicks ‘yes’
7. A toast displays the message “Order has been canceled”
8. Application returns to orders page
9. User will see cancel next to the desire order
10. Use case ends

Secondary flow:
5. Application displays the message “Sorry order has already been fulfilled, unable to cancel”
6. Application returns to orders page
7. Use case ends
Use Case 11: Edit user information

pass

Primary flow:
1. User logins as an existing user
2. User clicks ‘Update user Information’
3. User types in name, phone number, and address
4. User clicks ‘Update’
5. A toast display the message “Updated”
6. New information should be displayed
7. Use case ends

Secondary flow:
3. User does not type in any information
4. User clicks ‘Update information’
5. Application display message “Please add information.”
6. User leaves text boxes empty
7. User clicks ‘Update information’
8. Application displays message “Sorry, can not update at this time”
9. User is returned to user home page
10. Use case ends

Secondary flow:
4. User types in a phone number with no area code
5. User clicks ‘Update information’
6. Application displays a message “Sorry the phone number does not seem right. Please try again”
7. User types in the same phone number.
8. User clicks ‘Update information’
9. Application displays the message “Sorry, can not update at this time.”
10. User is returned to user home page
11. Use case ends

https://youtu.be/g1XRfI1ZbRs?t=326
Use Case 12: Save item for later

fail

Primary flow:
1. User logins as an existing user
2. User searches for an item
3. User selects items
4. User clicks ‘Save item’
5. A toast displays the message “Item is saved”
6. User returns to home page
7. User clicks ‘My saved items’
8. User can see the saved item under saved items
9. Use case ends

Secondary flow:
5. Application displays the message “Sorry, this item has already been saved.”
6. Use case ends
Use Case 13: Add an item to Cart

fail

Primary flow:
1. User logins as an existing user
2. User searches for an item
3. User finds item
4. User clicks ‘Add item’
5. A toast displays the message “Item is saved”
6. User returns to landing page
7. User clicks ‘Shopping cart’
8. User can see item in shopping cart
9. Use case ends
Use Case 14: Search for an item

pass

Primary flow:
1. User logins as an existing user
2. User clicks ‘Search’
3. User types the name of the item
4. Application displays items with the name in the results list
5. Use case ends

Secondary flow:
4. No items have the name typed
5. Application displays message saying “No results”
6. User can enter another search
7. Use case ends

https://youtu.be/g1XRfI1ZbRs?t=356
Use Case 15: Delete Item from Cart

fail

Primary flow:
1. User logins as an existing user
2. User clicks ‘Shopping cart’
3. User can see item in shopping cart
4. User finds items
5. User clicks ‘delete’
6. A toast is display saying “Item has been deleted”
7. Use case ends
Use Case 16: Add a promo code

fail

Primary flow:
1. User logins as an existing user
2. User searched for item(s)
3. User add item(s) to shopping cart
4. User views shopping cart
5. User clicks ‘Add promo code’
6. User types in promo code
7. User clicks ‘enter’
8. Applications displays the message “Promo code is added”
9. User clicks ‘Submit order’
10. Use case ends

Secondary flow:
8. Application displays the message “Sorry, promo code is not valid.”
9. User types in another promo code.
10. Application displays the message “Sorry, promo code is not valid.”
11. User clicks ‘Submit order’
12. Use case ends

You might also like