Electronic-online-store-console-
To install and run the software use an IDE suitable for Java code (Eclipse 💻Installation download , NetBeans download , IntelliJ download , etc.). When you have installed the IDE you prefer, you can run the program inside it by opening the java project in this folder and clicking the "Run" button.
Once the program has been run, the console will welcome you to e-commerce and you will be asked to choose whether you want to log in or register. 👨💻Use
WELCOME to my e-commerce
Do you want to Log in (key: l) or Sign Up (key: s)?
There are three accounts by default:
- Administrator account: Federico Canali, username, fede and password f
- Employee account: Alice Jones, username ali and password jS
- User account: Bob Smith, username bob and password b
By choosing the registration and entering "s" you will be asked for your name, surname, username and password.
Insert your name ...
Freddy
Insert your lastname ...
Mercury
Insert username ...
fred
Insert password ...
FreD23 £
Registration was successful!
Choosing the login and entering "l" you will be asked for a username and password.
******* Log in *******
Insert username ...
bob
Insert password ...
b
######## TYPE OF OPERATIONS YOU CAN DO ########
Print products list: (key: p)
Search product: (key: search)
Buy one product (key: buy)
Logout: (key: o)
#####################
Welcome bob [type of user: Customer]
Insert key of operation you want to do ...
After logging in, you will be shown all the possible operations that can be performed with the type of account you are using.
By user (customer):
######## TYPE OF OPERATIONS YOU CAN DO ########
Print products list: (key: p)
Search product: (key: search)
Buy one product (key: buy)
Logout: (key: o)
#####################
By employee:
######## TYPE OF OPERATIONS YOU CAN DO ########
Print products list: (key: p)
Ship a product: (key: ship)
Update quantity of a product: (key: update)
Logout: (key: o)
#####################
For administrator:
######## TYPE OF OPERATIONS YOU CAN DO ########
Print products list: (key: p)
Print all employee: (key: e)
Add new employee: (key: new)
Add new product: (key: newp)
Remove a product: (key: removep)
Logout: (key: o)
#####################
⚒️Types of operations you can do based on your privileges:
Print the product list
Insert key of operation you want to do ...
p
----- ALL PRODUCTS -----
Products [productName = HP computers, productCode = 0, producerName = HP, price = 556.0 €, quantity = 10]
Products [productName = Earphones, productCode = 1, producerName = AKG, price = 35.5 €, quantity = 2]
Products [productName = Mi LED TV, productCode = 2, producerName = Xiaomi, price = 279.0 €, quantity = 40]
Products [productName = iPad, productCode = 3, producerName = Apple, price = 999.99 €, quantity = 5]
Products [productName = iPhone X, productCode = 4, producerName = Apple, price = 1299.99 €, quantity = 2]
Search for a product with one or more filters
Insert key of operation you want to do ...
search
Insert max price ... else insert 0
1000
Insert min price ... else insert 0
36
Insert product's name ... else insert 0
hp
Insert producer's name ... else insert 0
0
------- Result of the search -------
Products [productName = HP computers, productCode = 0, producerName = HP, price = 556.0 €, quantity = 10]
Purchase a product
Insert key of operation you want to do ...
buy
Insert product's code ...
4
Insert product's quantity ...
5
The quantity that you want to buy is not avaiable ...
Insert key of operation you want to do ...
buy
Insert product's code ...
4
Insert product's quantity ...
1
Congratulation! You've buy this product => iPhone X qt = 1
Order a product
Insert key of operation you want to do ...
ship
Insert product's code ...
2
Insert product's quantity ...
39
Congratulation! You've ship this product => Mi LED TV qt = 39
This product is out of stock ... Please reorder it .Products [productName = Mi TV LED, productCode = 2, producerName = Xiaomi, price = 279.0 €, quantity = 0]
Update a quantity of a product
Insert key of operation you want to do ...
update
Insert product's code ...
2
Insert number of products arrived ...
5
The quantity of this product has been updated successfully! Products [productName = Mi LED TV, productCode = 2, producerName = Xiaomi, price = 279.0 €, quantity = 5]
Print the employee list
Insert key of operation you want to do ...
And
----- ALL EMPLOYEES ----
Person [name = Alice, lastName = Jones, credentials = Credentials [username = ali, password = jS]]
-----------------------
Add a new employee
Insert key of operation you want to do ...
new
Insert employee's name ...
Anne
Insert employee's lastname ...
Watson
Insert employee's username ...
anne
Insert employee's password ...
anne45 $
New employee added correctly!
Add a new product
Insert key of operation you want to do ...
newp
Insert product's name ...
Keyboard
Insert producer's name ...
HP
Insert product's price ...
34.69
Insert product's quantity ...
6
New product added successfully!
Remove a product
Insert key of operation you want to do ...
removep
Insert product's code ...
5
This product has been removed! Products [productName = Keyboard, productCode = 5, producerName = HP, price = 34.68 €, quantity = 6]