0% found this document useful (0 votes)
9 views9 pages

Electronic Store Management System

The document is an investigatory project file for a Computer Science course at St. Joseph's Convent High School, focusing on an Electronic Store Management System. It includes a certificate of completion, acknowledgments, and a Python implementation of the system with classes for products and the store, along with methods for managing inventory. The project aims to demonstrate practical skills in programming and project management for the academic session 2024-2025.

Uploaded by

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

Electronic Store Management System

The document is an investigatory project file for a Computer Science course at St. Joseph's Convent High School, focusing on an Electronic Store Management System. It includes a certificate of completion, acknowledgments, and a Python implementation of the system with classes for products and the store, along with methods for managing inventory. The project aims to demonstrate practical skills in programming and project management for the academic session 2024-2025.

Uploaded by

basantisaha941
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

ST.

JOSEPH’S CONVENT HIGH SCHOOL


(C.B.S.E) CHITTARANJAN
SESSION:-2024-25

COMPUTER SCIENCE
SUB. CODE – 083
CLASS XITH INVESTIGATORY PROJECT FILE
ELECTRONIC STORE
MANAGEMENT SYSTEM
CERTIFICATE

This is to certify that Mainak Saha, Roll No:20, of


Class: XI, Session : 2024-2025 has prepared the
Practical File as per the prescribed syllabus of

COMPUTER SC (SUB. CODE:-083)

under my supervision, I am completely satisfied by the


performance. I wish him/her all the success in life.

ACKNOWLEDGEMENT
Apart from the efforts of me, the success of any project depends
largely on the encouragement and guidelines of many others. I take
this opportunity to express my gratitude to the people who have
been instrumental in the successful completion of this project. I
express deep sense of gratitude to almighty God for giving me
strength for the successful completion of the project. I express my
heartfelt gratitude to my parents for constant encouragement while
carrying out this project. I gratefully acknowledge the contribution
of the individuals who contributed in bringing this project up to
this level, who continues to look after me despite my flaws, I
express my deep sense of gratitude to the luminary The Principal,
ST. Joseph’s Convent High School (C.B.S.E), Chittaranjan who
has been continuously motivating and extending their helping
hand to us. My sincere thanks to Mr. Sudip Paul , Master In-
charge, A guide, Mentor all the above a friend, who critically
reviewed my project and helped in solving each and every
problem, occurred during implementation of the project The
guidance and support received from all the members who
contributed and who are contributing to this project, was vital for
the success of the project. I am grateful for their constant support
and help.

class Product:
def _init_(self, product_id, name, brand, price, stock):
self.product_id = product_id
[Link] = name
[Link] = brand
[Link] = price
[Link] = stock

def update_stock(self, quantity):


"""Update the stock of the product."""
[Link] += quantity

def sell_product(self, quantity):


"""Sell the product by decreasing stock."""
if quantity > [Link]:
print(f"Not enough stock for {[Link]}. Only
{[Link]} left.")
else:
[Link] -= quantity
total_price = [Link] * quantity
print(f"{quantity} {[Link]}(s) sold for
{total_price:.2f} USD.")
class ElectronicStore:
def _init_(self):
[Link] = {}

def add_product(self, product):


"""Add a new product to the inventory."""
if product.product_id in [Link]:
print(f"Product ID {product.product_id} already
exists.")
else:
[Link][product.product_id] = product
print(f"Product {[Link]} added successfully.")

def display_products(self):
"""Display all products in the inventory."""
if not [Link]:
print("No products available in the store.")
return
print("\nProduct List:")
print("ID | Name | Brand | Price | Stock")
for product in [Link]():
print(f"{product.product_id} | {[Link]} |
{[Link]} | {[Link]} | {[Link]}")

def update_product_stock(self, product_id, quantity):


"""Update the stock of an existing product."""
if product_id in [Link]:
product = [Link][product_id]
product.update_stock(quantity)
print(f"Stock of {[Link]} updated. New stock:
{[Link]}")
else:
print(f"Product with ID {product_id} not found.")

def sell_product(self, product_id, quantity):


"""Sell a product."""
if product_id in [Link]:
product = [Link][product_id]
product.sell_product(quantity)
else:
print(f"Product with ID {product_id} not found.")
def get_product_by_id(self, product_id):
"""Retrieve product by ID."""
return [Link](product_id, None)

def main():
store = ElectronicStore()

# Adding some sample products


product1 = Product(1, "Smartphone", "BrandX", 500.0, 10)
product2 = Product(2, "Laptop", "BrandY", 1200.0, 5)
product3 = Product(3, "Tablet", "BrandZ", 350.0, 15)

store.add_product(product1)
store.add_product(product2)
store.add_product(product3)

while True:
print("\nElectronic Store Management System")
print("1. View Products")
print("2. Add New Product")
print("3. Update Product Stock")
print("4. Sell Product")
print("5. Exit")

choice = input("Enter your choice: ")

if choice == '1':
store.display_products()

elif choice == '2':


product_id = int(input("Enter Product ID: "))
name = input("Enter Product Name: ")
brand = input("Enter Brand: ")
price = float(input("Enter Price: "))
stock = int(input("Enter Stock Quantity: "))
new_product = Product(product_id, name, brand,
price, stock)
store.add_product(new_product)

elif choice == '3':


product_id = int(input("Enter Product ID: "))
quantity = int(input("Enter Quantity to Update: "))
store.update_product_stock(product_id, quantity)

elif choice == '4':


product_id = int(input("Enter Product ID: "))
quantity = int(input("Enter Quantity to Sell: "))
store.sell_product(product_id, quantity)

elif choice == '5':


print("Exiting the store management system.")
break

else:
print("Invalid choice! Please select a valid option.")

if _name_ == "_main_":
main()

You might also like