Skip to content

Latest commit

 

History

History
33 lines (20 loc) · 1.55 KB

README.md

File metadata and controls

33 lines (20 loc) · 1.55 KB

Java-Console-Shopping-System

This is a simple Java console application for an online shopping system. It allows users to log in, buy products, cancel products, display all products, and log out. The application uses a HashMap to store user credentials and a separate Business Logic (BL) class to handle the buying and cancelling of products.

This code is a good starting point for anyone who wants to learn Java programming or develop a more complex shopping system. Feel free to use and modify the code according to your needs.

Getting Started

To run this program, you'll need Java installed on your computer. Clone this repository and navigate to the directory containing the "MainApp1.java" file. Then, compile and run the program using the following commands in your terminal:

javac MainApp1.java

java MainApp1

Usage

When you run the program, a menu will be displayed with several options. Enter the number corresponding to the action you want to perform:

Log in: Enter your username and password to log in to the system.

Buy product: If you're logged in, you can buy a product by entering its name and price.

Cancel product: If you're logged in, you can cancel a product by entering its name.

Display all products: Display all the products available in the system.

Sign out: Log out of the system.

Exit: Exit the program.

Contributions

Feel free to fork this repository and make changes to the code. If you find any bugs or want to suggest improvements, please open an issue or submit a pull request.

License

This code is released under the MIT License