Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Text - based User Interface: When your program first runs, it will ask the user to log in by providing a user name and password
Textbased User Interface:
When your program first runs, it will ask the user to log in by providing a user name and
password as follows. In your code, at least, the following users should be already defined with
user name ahmet and password and zeynep with password You will have
one administrator account with name admin and password qwerty You may define
additional users if you like.
Welcome to Medipol Online Market
Please log in by providing your user credentials:
User Name:
If the user enters invalid credentials, the program should ask the user to try again. The
user successfully logs in when the provided credentials are valid, if the user enters invalid
credentials for the same user time in row, the account will be blocked and the user will not
be allowed to login The program will warn the user in such a case. The following shows
the interface for the initial login screen with a scenario where the user first enters incorrect
credentials, and then successfully logs in during the second trial.
Welcome to Medipol Online Market
Please log in by providing your user credentials:
User Name: ahmet
Password:
Your user name andor password is not correct. Please try again!
User Name: ahmet
Password:
Successfully logged in
The following shows the interface for the initial login screen again with a scenario where the
user enters incorrect credentials, and then a warning message will be shown. Note: Even
if the user tries to log in later, their account should remain blocked
Welcome to Medipol Online Market
Please log in by providing your user credentials:
User Name: ahmet
Password:
Your user name andor password is not correct. Please try again!
User Name: ahmet
Password:
Your user name andor password is not correct. Please try again!
User Name: ahmet
Password:
Your user name andor password is not correct.
Your account has been blocked. please contact the administrator.
Once the user enters valid credentials, your program should greet the user with the following
message, and provide a menu of the options to do User will do a selection by entering the
corresponding menu number, and accordingly different information will be shown andor
requested.
Welcome, ahmet! Please choose one of the following options by entering the corresponding
menu number.
Please choose one of the following services:
Search for a product
See Basket
Check Out
Logout
Exit
Your Choice
If the user enters an invalid menu entry, the program should warn the user to provide a valid
menu number
When main menu item is chosen, the user will be asked to provide search terms Then,
your program will display a list of all items from inventory whose name includes the user
provided search terms and whose stock amount is greater than For instance, when the
user searches for Juice the program should display all items whose name includes juice
and available in the stocks as follows. Product name checking should be case insensitive
ie you should not differentiate between lower and upper case letters
Please choose one of the following Services:
Search for a product
See Basket
Check Out
Logout
Exit
Your Choice:
What are you searching for? Juice
found similar items:
grape juice $
orange juice $
apple juice $
Please select which item you want to add to your basket Enter for main menu:
Note that each matching item is assigned a number, and the program asks the customer to
enter the number corresponding to a product to add to hisher basket. A customer may
cancel the current search session and go back to main menu by entering at this stage. Once
the customer chooses a product to add to the basket, the program will ask for the amount.
If the requested amount is not exceeding the stock amount of the selected product in the
inventory, the product should be added to the basket, and the customer should be notified
about it and then the main menu should be displayed.
Please select which item you want to add to your basket Enter for main menu:
Adding apple juice. Enter Amount:
Added apple juice into your Basket.
Going back to main menu...
Please choose one of the following services:
Search for a product
See basket
Check out
Logout
Exit
Your Choice:
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
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