Skip to content

A simple Java-based console application for managing grocery inventory, billing, and cart operations. This project is designed for small retail stores or individuals who want to keep track of their grocery stock, update inventory, and generate receipts for purchases.

Notifications You must be signed in to change notification settings

Mr-Ankitpandey/Java-Grocery-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grocery Inventory Management System

A simple Java-based console application for managing grocery inventory, billing, and cart operations. This project is designed for small retail stores or individuals who want to keep track of their grocery stock, update inventory, and generate receipts for purchases.

Features

  • Admin Login: Secure access to inventory management features via username and password authentication.
  • Inventory Management:
    • Add new grocery items with stock and price.
    • View all available items and their details.
    • Update stock and price for existing items.
    • Persistent storage of inventory using JSON files.
  • Billing & Cart System:
    • Add items to a shopping cart with quantity checks against available stock.
    • Remove items from the cart.
    • Automatic stock reduction upon billing.
    • Generate and print a detailed receipt for each transaction.
    • Save receipts as text files for record-keeping.
  • User-Friendly Console Interface: Simple menu-driven navigation for all operations.

File Structure

  • MainApp.java - Entry point and main menu logic.
  • LoginManager.java - Handles admin authentication.
  • InventoryManager.java - Manages inventory CRUD operations and persistence.
  • GroceryItem.java - Represents a grocery item.
  • CartManager.java - Handles cart operations and receipt generation.

Getting Started

How to Run

  1. Clone or Download this repository.

  2. Compile all Java files:

  3. Run the application:

Example

===== GROCERY SYSTEM MENU =====
1. Add Item to Inventory
2. View Stock
3. Update Item
4. Start Billing (Cart)
5. Remove Item from Cart
6. Exit
Choose an option:

License

This project is for educational purposes.


Code by: @nkit

About

A simple Java-based console application for managing grocery inventory, billing, and cart operations. This project is designed for small retail stores or individuals who want to keep track of their grocery stock, update inventory, and generate receipts for purchases.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages