Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation


Inventory Management System (C Project)

A console-based Inventory Management System implemented in C, demonstrating the use of Array, Stack, and Queue data structures to manage products, record updates, and process customer orders efficiently.


Project Overview

This project simulates a basic inventory management workflow for a small business or warehouse.
It allows users to:

  • Add or update product quantities
  • View the entire inventory
  • Undo the last stock update
  • Add customer orders to a processing queue
  • Process orders in a first-in-first-out manner

This project highlights the application of multiple data structures to solve practical, real-world problems.


Features

  • Add / Update Products: Add new products or restock existing items.
  • Undo Functionality: Reverse the most recent update using a stack (LIFO).
  • Order Queue: Manage customer orders in FIFO order.
  • Display Inventory: View current stock levels for all products.
  • Modular Structure: Each operation is implemented as a separate function.

Data Structures Used

Data Structure Role in the System
Array Stores product details such as name and quantity.
Stack Records update history to allow Undo operations.
Queue Manages and processes orders sequentially.

System Design Overview

Inventory (Array) ├──> Stack → Undo last update (LIFO) └──> Queue → Process orders (FIFO)

This structure allows efficient product tracking, order handling, and rollback of stock changes.


How to Run the Program

  1. Clone the Repository

    git clone https://github.com/<your-username>/inventory-management-c.git
    
    
  2. Navigate to the Project Directory

    cd inventory-management-c
  3. Compile the Code

    gcc inventory_management.c -o inventory
  4. Run the Program

    ./inventory

How to Use

When you run the program, you will see a text-based menu:

===== Inventory Management System =====
1. Add/Update Product
2. Display Inventory
3. Undo Last Update
4. Add Order
5. Process Order
6. Exit

Menu Operations

  • Option 1: Enter the product name and quantity to add or update inventory.
  • Option 2: Display the list of all available products with current stock levels.
  • Option 3: Undo the most recent inventory update (restores previous quantity).
  • Option 4: Enter the product name and quantity to place a new order (added to queue).
  • Option 5: Process the earliest order from the queue.
  • Option 6: Exit the application.

Example Workflow

  1. Add a new product: “Laptop 10”
  2. Update the product: Add 5 more units
  3. Undo last update: Revert to previous stock (10 units)
  4. Add an order: Laptop, Quantity 3
  5. Process order: Inventory reduces from 10 to 7 units

File Structure

inventory-management-c/
 ├── inventory_management.c   # Main source code
 ├── README.md                # Documentation
 └── sample_output.txt        # (Optional) Example terminal output

Future Enhancements

  • Implement file handling to store and load data persistently.
  • Add product search, delete, and sorting functionalities.
  • Include low-stock alerts and restock suggestions.
  • Develop a graphical user interface (GUI) using C++, Python, or Java.
  • Integrate a database such as MySQL or SQLite.
  • Add reporting and analytics (sales, restock trends).

Team Members

  • Jaineel Patel
  • Vaibhav Rathod
  • Rudranch Singh

Learnings

  • Applied multiple data structures in a single project.
  • Developed understanding of stack (LIFO) and queue (FIFO) operations.
  • Practiced modular programming and structured code design in C.
  • Improved problem-solving and debugging skills through implementation.

Conclusion

The Inventory Management System demonstrates how arrays, stacks, and queues can work together to form a robust and efficient product management application. It serves as a foundation for larger-scale inventory or warehouse management systems, combining theory with practical implementation.


Developed as part of the Data Structures Mini Project (Internal Assessment 2).

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages