Skip to content

latenightcoder-git/ProductManagementSystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Product Management System (Core Java)

A menu-driven, console-based Product Management System implemented in Core Java using HashMap.
This project demonstrates CRUD operations, exception handling, interface usage, and custom sorting (by name and price).
It also includes JUnit test cases for validating each operation.


πŸš€ Features

  • Add Product β†’ Insert new products with unique IDs
  • View Product by ID β†’ Retrieve product details
  • Update Product β†’ Modify product name and price
  • Delete Product β†’ Remove product by ID
  • Display All Products β†’ Show all available products
  • Sorting β†’ Sort products by Name or Price (using Comparator)
  • Exception Handling β†’ Handles duplicate IDs, missing products, etc.
  • Interface Usage β†’ Follows abstraction via ProductOperations
  • JUnit Test Cases β†’ Covers all CRUD + sorting functionality

πŸ› οΈ Tech Stack

  • Java (Core Java, JDK 25)
  • Collections API (HashMap, List, Comparator)
  • JUnit 5 (Testing framework)

πŸ“‚ Project Structure

ProductManagementSystem/
β”‚
β”œβ”€β”€ src/main/java/com/example
β”‚ β”œβ”€β”€ Product.java # Entity class
β”‚ β”œβ”€β”€ ProductOperations.java # Interface for operations
β”‚ β”œβ”€β”€ ProductService.java # Implementation using HashMap
β”‚ └── Main.java # Menu-driven console client
β”‚
β”œβ”€β”€ test/
β”‚ └── ProductServiceTest.java # JUnit test cases
β”‚
β”œβ”€β”€ README.md
└── .gitignore


πŸ“– Learning Outcomes

  • Using HashMap for CRUD-based storage
  • Implementing interfaces for abstraction
  • Applying custom sorting with Comparator
  • Handling exceptions effectively
  • Writing JUnit tests for validation

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages