This is a Java-based Product Management System that allows you to manage a list of products. You can add, retrieve, delete, and filter products based on various criteria such as name, place, warranty, and more. The system is designed to be simple and easy to use.
The system provides the following 8 methods to manage products:
-
Add Product
Adds a new product to the list.- Method:
addProduct(Product product)
- Method:
-
Get All Products
Retrieves and displays all products in the list.- Method:
getAllProducts()
- Method:
-
Get Product by Name
Searches for a product by its name and displays it.- Method:
getProductByName(String name)
- Method:
-
Get Products by Place
Filters and displays products based on their place (location).- Method:
getProductByPlace(String place)
- Method:
-
Delete Product by Name
Deletes a product from the list by its name.- Method:
deleteProductByName(String name)
- Method:
-
Delete All Products
Clears the entire list of products.- Method:
deleteAllProducts()
- Method:
-
Out of Warranty Products
Filters and displays products that are out of warranty based on the given year.- Method:
outOfWarrenty(int year)
- Method:
-
Find Products by Substring
Searches for products whose name, type, place, or warranty contains the given substring.- Method:
findBySubString(String text)
- Method:
The project consists of the following classes:
Product.java
Represents a product with attributes: name, type, place, and warranty.
Includes constructors, getters, setters, and a toString() method.
ProductServices.java
Contains the logic for managing the list of products.
Implements all 8 methods for adding, retrieving, deleting, and filtering products.
Main.java
Demonstrates the usage of the ProductServices class.
Adds sample products and calls various methods to showcase functionality.
- Clone the Repository
Clone this repository to your local machine using the following command:git clone https://github.com/your-username/product-management-system.git