/Inventory-Management-System

An Inventory Management System based on Java Collections for adding, updating, removing, and displaying items using various data structures.

Primary LanguageJava

Inventory Management System

The Inventory Management System is a simple Java application designed to manage a list of items with their associated quantities and prices. It allows users to add, update, remove, and display items in the inventory. This project demonstrates basic object-oriented programming concepts, including the use of collections like TreeMap, HashMap, and ArrayList.

Features

  • Add new items to the inventory.
  • Update existing items' quantity and price.
  • Remove items from the inventory.
  • Display all items in the inventory.
  • Use of multiple data structures to manage and manipulate inventory data (TreeMap, HashMap, ArrayList).

Technologies Used

  • Java: Programming language for the core application.
  • Collections: TreeMap, HashMap, ArrayList for inventory management.
  • Scanner: For user input.

Project Structure

The project is composed of two main classes:

  • Item.java: Represents the details of an inventory item (name, quantity, price).
  • InventoryManagementSystem.java: Manages the inventory, handling user input and performing CRUD (Create, Read, Update, Delete) operations on items.

How to Run the Program

  1. Ensure you have Java Development Kit (JDK) installed on your machine.

  2. Clone or download the repository from GitHub.

  3. Navigate to the project folder and compile the Java files using:

    javac InventoryManagementSystem.java
  4. Run the program with:

    java InventoryManagementSystem
  5. Follow the on-screen prompts to manage your inventory.

Example Usage

Inventory Management System

  1. Add Item
  2. Update Item
  3. Remove Item
  4. Display Inventory
  5. Exit

Choose an option: 1

Enter item name: Laptop
Enter quantity: 5
Enter price: 1200.50
Item added successfully!

Data Structures Used

TreeMap: Used to store inventory items in alphabetical order by item name.
HashMap: Provides fast access to inventory quantities.
ArrayList: Maintains the list of items for easy iteration and display.