This Inventory Management System allows shop owners to manage their products, including adding new products, viewing available products, and updating product details. The system makes use of Stacks and Queues to handle recently added products and manage product actions.
- Add Products: Add new products with details such as name, price, and quantity.
- View Products: Display available products in the inventory.
- Update Product: Update product details.
- Recently Added Products Stack: Track the most recently added products using a stack.
- Product Removal Queue: Manage removed products using a queue.
Before you can run this project, you need to have the following installed on your system:
-
Java Development Kit (JDK): Java 8 or higher.
- You can download it from Oracle's official website or use OpenJDK.
-
Visual Studio Code (VS Code) or any Java IDE:
- Download VS Code from VS Code Official Website.
-
Java Extensions for VS Code:
- Install the Java Extension Pack from the Extensions marketplace in VS Code. It includes:
- Java Language Support by Red Hat
- Java Debugger
- Maven for Java (optional)
- Java Test Runner
- Install the Java Extension Pack from the Extensions marketplace in VS Code. It includes:
-
Maven (Optional) for managing external libraries.
src
: Contains the Java source code files (Main.java
,Shop.java
,Product.java
).lib
: Optional folder for dependencies if your project requires external libraries.bin
: The folder where the compiled.class
files will be placed by default when you run the Java code.
-
Clone or Download the Repository: Clone or download this project to your local machine.
-
Open the Project in Visual Studio Code:
- Launch Visual Studio Code.
- Open the folder containing the project files by clicking on File > Open Folder and selecting the project directory.
-
Run the Project:
- In VS Code, open the
Main.java
file (or any entry point class). - Press F5 or choose Run > Start Debugging to compile and run the program.
- In VS Code, open the
-
Using the Integrated Terminal:
- Alternatively, you can open the integrated terminal in VS Code and manually compile and run the project:
javac Main.java Shop.java Product.java java Main
- Alternatively, you can open the integrated terminal in VS Code and manually compile and run the project:
-
Add Product:
- When prompted, enter the product name, price, and quantity.
- The product is then added to the inventory, and it's pushed onto a stack to track recently added products.
-
View Available Products:
- View the list of products available in the inventory.
-
Update Product:
- Update the details of a specific product by entering the new product name, price, and quantity.
-
Exit:
- Exit the application when done.