You are on page 1of 16

Nima Mahanloo

Project 02: Shop Master (A Storefront Application)


CST 338-40_SP23

Shop Master
This program provides an Android application for managing, registering, and canceling product orders
by administrators and customers of an online store.

GitHub: https://github.com/nmahanloo/Project2

Google Drive:
https://drive.google.com/file/d/1yqKCNKxrGtW7yupgEfkdkjdhLFQ2pFtf/view?usp=share_link

Table of contents
Initial Layout 2
Use Case Model 3
Entity Relationship Diagram (ERD) 4
[insert your own ERD here. Note that this will need] 4
Use Case 01: Predefined Users 5
Use Case 02: Persistence 6
Use Case 03: Add a user 7
Use Case 04: Delete a user 8
Use Case 05: Password change 9
Use Case 06: Change user permission 10
Use Case 07: Remove a product from database 11
Use Case 08: Search items by name or description 12
Use Case 09: Add items to shopping cart 13
Use Case 10: Change the quantity of shopping items in the cart 14
Use Case 11: Place an order 15
Use Case 12: Cancel an order 16
Initial Layout
Include a layout similar to the one shown below. This can be created using screenshots from Android
Studio, using Draw.Io, or even sketched out on paper (or a tablet if you are fortunate enough to have
one).
Use Case Model
Insert your actor diagrams here. It should show the users and their roles and the use cases they
complete. This does not need to be 100% comprehensive, but I'd like to see at least 2 actors with three
actions each.
Entity Relationship Diagram (ERD)

The assignment MUST use a database and must have at least three tables
Use Case 01: Predefined Users
PASSED

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.

Video Link: https://youtu.be/Pe5oQzTTOOU

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


android/
Use Case 02: Persistence
PASSED

1. Add a product to the database.


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

Video Link: https://youtu.be/Erimh0kQv8U

2How to force quit an application in Android: https://www.digitaltrends.com/mobile/how-to-force-close-apps-


android/
Use Case 03: Add a user
PASSED

1. Select “Create a New Account” on the login dialog page.


2. Set a username as “testuser2” and choose a password.
3. Sign up.
4. Force quit the application.
5. Log into the application and you should direct to the “testuser2” account.
6. Log out, then log back in by using the recently added username and password in step 1.
7. Log out of the application.
8. Select “Create a New Account” again.
9. Enter “testuser2” again as username to create a new account.
10. An error message “Username testuser2 has already taken” must be shown.
11. Log back into the app by “admin2”.
12. Show “testuser2” account is available in the list of user accounts on the admin tools.

Video Link: https://youtu.be/NBqmoD0OrRI


Use Case 04: Delete a user
PASSED

1. Log into “admin2” account.


2. Go to the admin tools.
3. Delete the user account “testuser2”, which recently added through case 3.
4. Force quit the application.
5. Open application.
6. Show the user has been removed from the database successfully.
7. Log out.
8. Try to login by using “testuser2” username and password.
9. An error should be displayed as “Invalid username”.

Video Link: https://youtu.be/Pf70DSdU-48


Use Case 05: Password change
PASSED

1. Log into “testuser1” account.


2. Select change password.
3. Fill all three text boxes.
4. Enter wrong password for current password.
5. Hit “Change Password”, an error should be displayed as “Invalid username”.
6. Enter current password correctly.
7. Enter mismatch passwords on new password and confirm new password.
8. Hit “Change Password”, an error should be displayed as “Passwords are not match”.
9. Enter the same password in the two text boxes for the new password.
10. Change the login password.
11. Log out.
12. Try to login by previous password.
13. an error should be displayed as “Invalid password”.
14. Log in with the updated password.
15. Go to the change password dialog page.
16. Enter the current password in all three text boxes.
17. An error message should be displayed as “Entered password is same as the current password”.

Video Link: https://youtu.be/An2gIlFxPC8


Use Case 06: Change user permission
PASSED

1. Log into “admin2” account.


2. Select admin tools.
3. Go to the “Manage Users Accounts”.
4. Select “testuser1” account.
5. Turn on admin authority for “testuser1”.
6. Force quit the application.
7. Open application to back into “admin2” account.
8. Log out.
9. Log into “testuser1” account.
10. Do something to prove "testuser1” has admin level permission.

Video Link: https://youtu.be/v3iPxIUlvLI


Use Case 07: Remove a product from database
PASSED

1. Log into the application using “admin2”.


2. Go to the “Admin Tools”.
3. Go to the Manage Products.
4. Select a product from the list.
5. Remove the selected product from the database.
6. Force quit the application.
7. Open application to back into “admin2” account.
8. Show the product is not available anymore in the database.

Video Link: https://youtu.be/9LbRT9nU0Fs


Use Case 08: Search products by name or description
PASSED

1. Log into the application.


2. Go to the “Shop” window.
3. Search for an item by entering its name.
4. Check the result.
5. Show that the search engine is not sensitive to capital letters.
6. Search for an item by entering a word or some words which are in its description.
7. Check the result.

Video Link: https://youtu.be/6vgN91guZmE


Use Case 09: Add items to shopping cart
PASSED

1. Log into the application.


2. Go to the shop window.
3. Search for an item and add it to the shopping cart.
4. Clear the search filter.
5. Add another item into the cart by selecting that from the list.
6. Check shopping cart to show the items have been added to the cart successfully.
7. Force quit the application.
8. Log back into the same account.
9. Go to the shopping cart to show the items that have been added recently, are still available
there.
10. Back to the main menu.
11. Go to the shop window.
12. Add an item to cart which is already in the shopping cart.
13. Go to shopping card, the quantity of the item in cart should be increased by 1.
14. Go back to the Shop.
15. Try to add an item to cart which its quantity in stock is equal to its quantity on cart.
16. An error as “Quantity not available” should be displayed.

Video Link: https://youtu.be/rdsOihSvEDM


Use Case 10: Change the quantity of shopping items in the cart
PASSED

1. Log into the application.


2. Go to the shop window.
3. Add an item to the shopping cart which has a quantity of 2 in stock.
4. Go to the shopping cart.
5. Change the quantity number of the added item to 4.
6. An error message as “Quantity not available" should be displayed.
7. Update the item quantity in the cart to 2.
8. Force quit from the application.
9. Log back into the same account.
10. Check the shopping cart to be sure the item quantity for that item is still 2.

Video Link: https://youtu.be/GW6DLbO8n0s


Use Case 11: Place an order
PASSED

1. Log into the application.


2. Go to the shop window.
3. Add an item to the shopping cart.
4. Go to the shipping card.
5. Place an order.
6. Check the placed order in the order history.
7. Force quit the application.
8. Log back into the same account.
9. Check the order history to be sure the order has already been placed successfully.

Video Link: https://youtu.be/CFb2JgHDunE


Use Case 12: Cancel an order
PASSED

1. Log into the application


2. Go to the shop window.
3. Try to add 0 quantity of an item to shopping cart.
4. An error as “Enter a valid quantity number” should be displayed.
5. Try to add 2 quantities of an item to the cart, which we have only 1 quantity in stock.
6. An error as “Quantity not available” should be displayed.
7. Finally, add an item to the shopping cart.
8. Go to the shopping cart.
9. Place the order.
10. Go to the order history to check if the order has already placed.
11. Select the order.
12. Cancel the order.
13. Force quit the application.
14. Log back into the same account.
15. Go to the order history to be sure the order has already been removed successfully.

Video Link: https://youtu.be/c_GD4HxR1co

You might also like