Answered step by step
Verified Expert Solution
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 to go back to main menu
Please select which item you want to add to your basket Enter for main menu:
Adding grape juice. Enter Amount:
Sorry! The amount exceeds the limit Please try again with smaller amount Amount Enter 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
What are you searching for? Lemon
Your search did not match any items. Please try something else Enter 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 reenter a valid menu item.
When main menu item is chosen, the user will be able to see the things heshe 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:
grape juice price$ amount total$
egg price$ amount total$
Total $
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 $ 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:
Update amount
Remove an item
Check out Go back to main menu
Your selection:
If user chooses basket submenu option 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:
Please type the new amount:
Your basket now contains:
grape juice price$ amount total$
egg price$ amount total$
Please Choose an option:
Update amount
Remove an item
Check out Go back to main menu
Your selection:
After this user will be redirected to the basket submenu again. If user chooses basket submenu option 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 submenu again.
If user chooses basket submenu option or main menu item 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
medipol.edu.tr
grape juice $ amount total$
egg $ amount total$
Total $
:
Thank You for using our Market!
During checkout, the program should decrease the stock amount of each userbought product properly in the inventory. After checkout, the program should show the main menu.
If user chooses main menu item 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, she should be able to see items that she added into the basket in his previous sessions
If user chooses main menu item 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 options to do Admin will do a selection by entering the corresponding menu number, and accordingly different information will be shown andor requested.
Welcome, admint! Please choose one of the following options by entering the corresponding menu number.
Please choose one of the following services:
Activate User Account
Deactivate User Account
Add User
Remove User
Logout
Exit
Your Choice
In option the blocked user account can be reactivated unblocked because of the entered wrong credentials.
In option the admin have the ability to deactivate a user account block
In option the admin can add a new user.
In option the admin can remove user.
In option the admin should log out, and the program should ask for user name and password again as explained at the beginning.
In option the program should exit.
Implementation Notes:
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
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started