0% found this document useful (0 votes)
23 views4 pages

Group 13 Project Report

Uploaded by

amitdaaas880
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views4 pages

Group 13 Project Report

Uploaded by

amitdaaas880
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Green University of Bangladesh

Department of Computer Science and Engineering (CSE)


Semester: (Fall, Year: 2024), B.Sc. in CSE (Day)

Project Name: Super Shop Management System

Course Title: Computational Thinking And Problem Solving


Course Code: CSE 100
Section: 242_D8
Students Details

Name ID
Mst. Nusrat Jahan Farin 242002164

Submission Date: 24.12.2024


Course Teacher’s Name: Abrar Hasan, Green
University Of Bangladesh.
Title of the Lab Report Experiment

Super Shop Management System

This lab report discusses the development and functionality of a Super Shop
Management System. The program allows the management of products in a shop,
providing features for adding, viewing, searching, updating, deleting, and purchasing
products.

Objectives/Aim

The objective of this experiment is to develop a Super Shop Management System in C


that enables users to manage products, including adding new products, viewing existing
products, updating product information, searching for products, deleting products, and
making purchases. The system helps simulate basic inventory management and allows
for real-time updates on product quantities and prices.

Procedure/Design

The system is designed with a simple menu-driven interface, where the user selects an
option to perform specific operations. The following steps outline the main features of
the system:

1. Preload some products:


a. Three products (Sauce, Chili, and Sugar) are preloaded with predefined
values for quantities and prices.
2. Add a Product:
a. The user can add a product by entering its name, quantity, and price.
3. View Products:
a. A list of all available products is displayed, showing their ID, name,
quantity, and price.
4. Search a Product:
a. The user can search for a product by its name.
5. Update Product:
a. The user can update a product's quantity or price.
6. Delete Product:
a. The user can delete a product by its ID.
7. Purchase Product:

1
a. The user can purchase a product by selecting its ID and entering the
desired quantity. The system checks stock levels before allowing the
purchase.

Implementation

The implementation involves the following components:

1. Global Variables:
a. Arrays to store product names, quantities, and prices.
b. A counter productCount to track the number of products in the
inventory.
2. Functions:
a. preloadProducts(): Initializes a few products at the beginning.
b. addProduct(): Adds a new product to the system.
c. viewProducts(): Displays a list of all products.
d. searchProduct(): Searches for a product by name.
e. updateProduct(): Allows the user to update a product's quantity or
price.
f. deleteProduct(): Deletes a product from the list.
g. purchaseProduct(): Allows the user to purchase products, checking
stock levels.

Here’s a snippet of the implementation:

// Function to add a new product


void addProduct() {
if (productCount >= MAX_PRODUCTS) {
printf("\nProduct list is full.\n");
return;
}

printf("\nEnter product name: ");


scanf(" %[^\n]s", names[productCount]);
printf("Enter quantity: ");
scanf("%d", &quantities[productCount]);
printf("Enter price: ");
scanf("%f", &prices[productCount]);

productCount++;
printf("\nProduct added successfully!\n");
}

2
Test Result/Output

 Test Case 1: Add Product


o Adding a new product (e.g., "Milk", quantity: 20, price: 1.99) successfully
adds it to the list.
o Output: "Product added successfully!"
 Test Case 2: View Products
o The list of products is displayed correctly, showing the product names,
quantities, and prices.
 Test Case 3: Search Product
o Searching for "Chili" successfully locates the product and displays its
details.
o Output: "Product Found: ID: 2, Name: Chili, Quantity: 30, Price: $2.49"
 Test Case 4: Purchase Product
o Purchasing 5 units of "Sauce" reduces its quantity by 5, and the correct
total price is displayed.
o Output: "Purchase successful! Total cost: $19.95"

Analysis and Discussion

 Challenges:
o Handling invalid inputs for product quantities and prices was challenging.
Input validation was added to ensure only valid data is entered.
 Results:
o The system works as expected, allowing users to perform all specified
operations without errors.
 Lessons Learned:
o Effective handling of arrays and user input is crucial for maintaining data
integrity in the system.
o The design of a simple, menu-driven system in C is an excellent way to
simulate real-world applications like inventory management.

Summary

This Super Shop Management System was successfully developed using C. It provides
essential features for product management, including the ability to add, view, search,
update, delete, and purchase products. The system is fully functional, and future
improvements could include adding file persistence for product data.

You might also like