Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

If the requested amount is over the stock amount, then the program should ask the user to provide another amount ( or Enter 0 to

If the requested amount is over the stock amount, then the program should ask the user to provide another amount (or Enter 0 to go back to main menu).
Please select which item you want to add to your basket (Enter 0 for main menu): 1
Adding grape juice. Enter Amount: 1000
Sorry! The amount exceeds the limit, Please try again with smaller amount Amount (Enter 0 for main menu):
If the search result is empty, the user will be requested to provide another search term (or, the user may go back to main menu by entering 0).
What are you searching for? Lemon
Your search did not match any items. Please try something else (Enter 0 for main menu):
Anywhere in the program, if the user makes a selection outside of the menu shown, the program must ask the user to re-enter a valid menu item.
When main menu item 2 is chosen, the user will be able to see the things he/she added to their basket, the price of the item per piece, the amount of the items in the basket, and lastly, the total price of the items in the basket.
Your basket contains:
1.grape juice price=9$ amount=1 total=9.0$
2.egg price=2$ amount=2 total=4.0$
Total 13.0$
Please note that if the basket is empty, your program should show that the users basket is empty, and the total price of items in the users basket is equal to 0$. After displaying items in your basket, youll be directed to another menu (to avoid confusion, refer to this menu as basket sub menu):
Please choose an option:
1.Update amount
2.Remove an item
3.Check out 4.Go back to main menu
Your selection:
If user chooses basket sub-menu option 1, user will select an item from their basket and update its amount. You should display the content of users basket, after the changes are applied. Reminder: Again, the new amount should be checked to make sure that it is not exceeding the stock amount. (Note: the inventory stock amounts of items in basket are not decreased until checkout.)
Please select which item to change its amount: 1
Please type the new amount: 2
Your basket now contains:
1.grape juice price=9$ amount=2 total=18.0$
2.egg price=2$ amount=2 total=4.0$
Please Choose an option:
1.Update amount
2.Remove an item
3.Check out 4.Go back to main menu
Your selection:
After this user will be redirected to the basket sub-menu again. If user chooses basket sub-menu option 2, user will select an item from their basket that will be removed from their basket. Again, please display the content of users basket, after the removal. After this, user will be redirected to the basket sub-menu again.
If user chooses basket sub-menu option 3, or main menu item 3, user will proceed to check out and your program will print the receipt as shown below. For the last part of your receipt, program should display the real date and time of the transaction.
Processing your receipt...
******* Medipol Online Market ********
**************************************
4448544
medipol.edu.tr
grape juice 9$ amount=2 total=18.0$
egg 2$ amount=2 total=4.0$
Total 22.0$
2023/08/2017:00
Thank You for using our Market!
During checkout, the program should decrease the stock amount of each user-bought product properly in the inventory. After checkout, the program should show the main menu.
If user chooses main menu item 4, the user should log out, and the program should ask for user name and password again as explained at the beginning. At this stage, the users basket content should still be stored, even after logging out. When the same user logs in again, s/he should be able to see items that s/he added into the basket in his previous session(s).
If user chooses main menu item 5, the program should exit.
Now, lets come back to the admin account, if the admin enters valid credentials, your program should greet the admin and provide a menu of 3 options to do. Admin will do a selection by entering the corresponding menu number, and accordingly different information will be shown and/or requested.
Welcome, admint! Please choose one of the following options by entering the corresponding menu number.
Please choose one of the following services:
1. Activate User Account
2. Deactivate User Account
3. Add User
4. Remove User
5. Logout
6. Exit
Your Choice
In option 1, the blocked user account can be reactivated (unblocked) because of the entered 3 wrong credentials.
In option 2, the admin have the ability to deactivate a user account (block).
In option 3, the admin can add a new user.
In option 4, the admin can remove user.
In option 5, the admin should log out, and the program should ask for user name and password again as explained at the beginning.
In option 6, the program should exit. A data structure must be used to keep user account information. A data structure must be implemented for the basket.
Whenever an operation is performed by the user, the above data structures should be updated properly to reflect the changes,
An additional data structure will be used for the market's invImplementa
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Automating Access Databases With Macros

Authors: Fish Davis

1st Edition

1797816349, 978-1797816340

More Books

Students also viewed these Databases questions

Question

Describe how the income multiplier works.

Answered: 1 week ago

Question

3. List ways to manage relationship dynamics

Answered: 1 week ago