Ilovepdf Merged
Ilovepdf Merged
H.S School
INVENTORY MANAGEMENT
SOFTWARE
Integrated Inventory Management
Solution: Enhancing the Business
DEPARTMENT OF COMPUTER
Shahid Amin
Newton
N-801829
Acknowledgment
We express our sincere appreciation to Principal Rajesh Karki for his
unwavering support and guidance throughout the development of this
Inventory management system project. His leadership and
encouragement have been instrumental in our journey.
We are also grateful to Computer Teacher Bishesh Shakya for sharing
his expertise and insights, which enriched our understanding of
software development concepts and contributed to the project's
success.
Furthermore, we extend our thanks to Lab Teacher Abhay Karna for his
assistance and support in providing the necessary resources and
facilities for testing and refining the project.
Their collective efforts have significantly contributed to the realization
of this project, and we are deeply thankful for their contributions.
Shahid Amin
Features:
Add Product: Enables users to add new products to the inventory, including specifying
product name, quantity, and price.
View Products: Allows users to view the list of all products in the inventory, along with
their respective quantities and prices.
Search Product: Facilitates searching for specific products by name, providing quick access
to product details.
Update Quantity: Enables users to update the quantity of existing products in the inventory.
Update Price: Allows users to update the price of existing products in the inventory.
Delete Product: Provides functionality to delete products from the inventory, removing them
from the system.
Display Inventory Value: Calculates and displays the total value of the inventory based on
product quantities and prices.
Display Low Stock Products: Identifies and displays products with low stock levels,
enabling proactive management of inventory replenishment.
Sort Products: Allows users to sort products by name or quantity, facilitating better
organization and management of the inventory.
Exit: Provides an option to exit the software, ending the inventory management session.
● Input validation is implemented to ensure the integrity of user inputs and prevent errors
during data entry.
● Sorting algorithms such as bubble sort and selection sort are utilized for sorting products
by name or quantity.
● The software employs modular design principles, with each feature encapsulated within
its own function for better code organization and readability.
int num_products = 0;
int main()
{
int choice;
do
{
printf("\nInventory Management System Menu:\n");
printf("1. Add Product\n");
printf("2. View Products\n");
printf("3. Search Product\n");
printf("4. Update Quantity\n");
printf("5. Update Price\n");
printf("6. Delete Product\n");
printf("7. Display Inventory Value\n");
printf("8. Display Low Stock Products\n");
printf("9. Sort Products\n");
printf("10. Exit\n");
printf("Enter your choice: ");
scanf("%d", &choice);
switch (choice)
{
case 1:
{
printf("\n+--------------------------------+\n");
if (num_products >= MAX_PRODUCTS)
{
printf("Maximum number of products reached.\n");
break;
}
num_products++;
printf("Product added successfully.\n");
printf("\n+--------------------------------+\n");
break;
}
case 2:
{
printf("\n+--------------------------------+\n");
printf("\nProducts:\n");
printf("Name\t\tQuantity\tPrice\n");
for (int i = 0; i < num_products; i++)
{
printf("%s\t\t%d\t\t%.2f\n", product_names[i], product_quantities[i], product_prices[i]);
}
printf("\n+--------------------------------+\n");
break;
}
case 3:
{
printf("\n+--------------------------------+\n");
char search_name[MAX_NAME_LENGTH];
printf("\nEnter product name to search: ");
scanf(" %[^\n]", search_name);
int found = 0;
printf("Search Results:\n");
for (int i = 0; i < num_products; i++)
{
if (strcmp(search_name, product_names[i]) == 0)
{
printf("Name: %s, Quantity: %d, Price: %.2f\n", product_names[i],
product_quantities[i], product_prices[i]);
found = 1;
}
switch (sort_choice)
{
case 1:
{
// Sort products by name (using bubble sort for simplicity)
for (int i = 0; i < num_products - 1; i++)
{
for (int j = 0; j < num_products - i - 1; j++)
{
if (strcmp(product_names[j], product_names[j + 1]) > 0)
{
// Swap names
char temp_name[MAX_NAME_LENGTH];
strcpy(temp_name, product_names[j]);
strcpy(product_names[j], product_names[j + 1]);
strcpy(product_names[j + 1], temp_name);
// Swap quantities
int temp_quantity = product_quantities[j];
product_quantities[j] = product_quantities[j + 1];
product_quantities[j + 1] = temp_quantity;
// Swap prices
float temp_price = product_prices[j];
product_prices[j] = product_prices[j + 1];
// Swap quantities
int temp_quantity = product_quantities[i];
product_quantities[i] = product_quantities[min_index];
product_quantities[min_index] = temp_quantity;
// Swap prices
float temp_price = product_prices[i];
product_prices[i] = product_prices[min_index];
product_prices[min_index] = temp_price;
}
printf("Products sorted by quantity.\n");
break;
}
default:
{
printf("Invalid choice.\n");
break;
}
return 0;
}