Skip to content

CyberVerve07/StockManagement

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

πŸ“Š Enhanced Stock Management System A feature-rich, color-coded Java console application for professional inventory and stock management with advanced analytics and reporting capabilities.

Java License Status

🌟 Features Core Functionality βœ… Add Stock - Add new products with quantity and price

βœ… Update Stock - Modify quantity and price of existing stocks

βœ… Remove Stock - Delete stock items with quantity validation

βœ… View All Stocks - Display complete inventory in formatted table

Advanced Features πŸ” Search Functionality - Case-insensitive partial matching

⚠️ Low Stock Alerts - Automatic warning system for running low

πŸ“Š Inventory Reports - Detailed statistics and analysis

πŸ“‹ Transaction History - Complete audit trail with timestamps

πŸ’° Inventory Valuation - Calculate total value with breakdowns

UI & UX 🎨 Color-Coded Interface - ANSI color codes for better visibility

πŸ“± Professional Formatting - Unicode borders and tables

😊 Emoji Support - Visual indicators for status and actions

⌚ Timestamp Logging - Automatic transaction tracking

πŸ“‹ System Requirements Java Version: Java 8 or higher

OS: Windows, macOS, Linux

Terminal: Any standard terminal/console

RAM: Minimal (< 50MB)

πŸš€ Quick Start Installation bash

Clone the repository

git clone https://github.com/yourusername/stock-management-system.git cd stock-management-system

Compile the code

javac EnhancedStockManagementSystem.java

Run the application

java EnhancedStockManagementSystem Usage text

  1. Select an option from the menu (1-10)
  2. Follow the prompts for each operation
  3. Enter valid data as requested
  4. View results with color-coded output
  5. Press Enter to return to menu πŸ“Š Feature Details
  6. Add New Stock text
  • Enter stock name (must be unique)
  • Enter quantity (non-negative)
  • Enter price per unit
  • Auto-logged to transaction history
  1. Update Stock Details text Options:
  • Update quantity only
  • Update price only
  • Update both simultaneously
  • Real-time modifications
  1. Remove Stock text
  • Enter stock name
  • Specify quantity to remove
  • Validation checks prevent over-removal
  • Auto-delete when quantity reaches 0
  1. Search Functionality text
  • Case-insensitive search
  • Partial name matching
  • Display matching results with details
  • Show quantity, price, and total value
  1. Low Stock Alerts text Triggers when:
  • Quantity < 10 items OR
  • Total value < β‚Ή5,000

Shows:

  • Alert icon (⚠️)
  • Stock name
  • Current quantity
  • Restock suggestion
  1. Inventory Report text Displays:
  • Generated timestamp
  • Total items in stock
  • Total unique products
  • Total inventory value
  • Average price per product
  • Top 3 stocks by value
  1. Transaction History text Records:
  • Operation type (ADD/UPDATE/REMOVE)
  • Stock name
  • Quantity involved
  • Timestamp (DD-MM-YYYY HH:MM:SS)
  • Formatted table view
  1. Total Inventory Value text Shows:
  • Grand total value
  • Product-wise breakdown
  • Percentage distribution
  • Color-coded display 🎨 Color Scheme Color Usage Code 🟒 Green Success, Positive actions \u001B[32m πŸ”΄ Red Errors, Warnings, Low stock \u001B[31m πŸ”΅ Blue Section headers \u001B[34m 🟑 Yellow Prompts, Inputs \u001B[33m πŸ”΅ Cyan Borders, Tables \u001B[36m βšͺ White Normal text \u001B[37m πŸ“ Project Structure text stock-management-system/ β”‚ β”œβ”€β”€ EnhancedStockManagementSystem.java β”‚ β”œβ”€β”€ EnhancedStockManagementSystem (Main class) β”‚ β”œβ”€β”€ Stock (Model class) β”‚ └── Transaction (History tracking class) β”‚ β”œβ”€β”€ README.md (this file) β”œβ”€β”€ COMPARISON.md (Original vs Enhanced comparison) β”œβ”€β”€ LICENSE └── .gitignore πŸ—οΈ Code Architecture Main Classes
  1. EnhancedStockManagementSystem java public class EnhancedStockManagementSystem {
    • main() : Entry point
    • run() : Main event loop
    • addStock() : Add new inventory
    • updateStock() : Modify stock details
    • removeStock() : Delete inventory
    • viewAllStocks() : Display all items
    • searchStock() : Find items
    • viewLowStockAlerts() : Show alerts
    • viewInventoryReport() : Generate report
    • viewTransactionHistory() : Show history
    • calculateTotalInventoryValue() : Calculate total
    • Helper methods for UI and validation }
  2. Stock java public class Stock {
    • String name
    • int quantity
    • double price
    • getters/setters
    • getTotalValue() : Calculate total
    • isLowStock() : Check threshold
    • removeQuantity() : Decrease inventory
    • toString() : Display format }
  3. Transaction java public class Transaction {
    • String type (ADD/UPDATE/REMOVE)
    • String stockName
    • int quantity
    • double price
    • String timestamp
    • Getters for all fields } πŸ“Š Comparison with Original Feature Original Enhanced Status Add Stock βœ“ βœ“ Enhanced Updated Remove Stock βœ“ βœ“ Enhanced Updated View Stock βœ“ βœ“ Full Table Improved Update Stock βœ— βœ“ NEW Search βœ— βœ“ NEW Low Stock Alerts βœ— βœ“ NEW Inventory Report βœ— βœ“ NEW Transaction History βœ— βœ“ NEW Total Value βœ— βœ“ NEW Color UI βœ— βœ“ NEW Error Handling Basic Advanced Enhanced Code Quality Good Excellent Enhanced Improvement Summary:

Lines of Code: 100 β†’ 500 (+400%)

Features: 3 β†’ 9 (+200%)

Classes: 2 β†’ 3 (+50%)

πŸ’‘ Usage Examples Example 1: Adding Stock text Enter stock name: Laptop Enter quantity: 50 Enter price per unit (β‚Ή): 45000 βœ… Stock added successfully! Example 2: Searching Stock text Enter stock name to search: Lap βœ… Found 1 result(s): Laptop

  • Quantity: 50
  • Price: β‚Ή45,000.00
  • Total Value: β‚Ή2,250,000.00 Example 3: Low Stock Alert text ⚠️ Found 2 stock(s) below optimal level:
  • Mouse: Qty: 5 (Consider restocking)
  • Keyboard: Qty: 8 (Consider restocking) Example 4: Inventory Report text πŸ“Š SUMMARY STATISTICS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Total Items in Stock: 250 Total Unique Products: 5 Total Inventory Value: β‚Ή5,000,000.00 Average Price: β‚Ή1,000,000.00

πŸ“ˆ TOP STOCKS BY VALUE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  1. Laptop - β‚Ή2,250,000.00
  2. Desktop - β‚Ή1,800,000.00
  3. Monitor - β‚Ή950,000.00 πŸ”„ Input Validation The system includes comprehensive validation:

java βœ“ Duplicate stock prevention βœ“ Negative number handling βœ“ InputMismatchException catching βœ“ Empty string validation βœ“ Quantity overflow prevention βœ“ Price validation βœ“ Range checking for menu options πŸ“ˆ Future Enhancements Database integration (MySQL/PostgreSQL)

File export (CSV/PDF reports)

User authentication system

Multi-warehouse support

Barcode/QR code integration

Mobile app companion

REST API development

GUI version using JavaFX

Automatic reorder alerts

Supplier management

🀝 Contributing Contributions are welcome!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors