0% found this document useful (0 votes)
10 views

COMPUTER_SCIENCE_PROJECT[1]

The document outlines a project on Shoe Shop Customer Management created by Abhigyan Singh Sontiyal for a Computer Science class. It includes functionalities for adding, viewing, updating, deleting customers, and generating receipts, along with a certificate and acknowledgments. The project emphasizes practical learning and is structured to fulfill CBSE project requirements.

Uploaded by

bogahe7600
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)
10 views

COMPUTER_SCIENCE_PROJECT[1]

The document outlines a project on Shoe Shop Customer Management created by Abhigyan Singh Sontiyal for a Computer Science class. It includes functionalities for adding, viewing, updating, deleting customers, and generating receipts, along with a certificate and acknowledgments. The project emphasizes practical learning and is structured to fulfill CBSE project requirements.

Uploaded by

bogahe7600
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/ 15

SUBJECT : COMPUTER SCIENCE

PROJECT
TOPIC : SHOE SHOP CUSTOMER MANAGEMENT

SUBJECT TEACHER : ANJALI PATHAK PROJECT SUBMITED BY:


ABHIGYAN SINGH SONTIYAL
CLASS : XII DAISY
BOARD ROLL NO :
BATCH : 2024 - 2025
ST.THERESA SR. SEC.SCHOOL,
KATHGODAM

CERTIFICATE

This is to certify that this project file is prepared by


______________ of class XII section_______, as a part of
CBSE Project Report subject examination requirement. It is
prepared under the guidance of________________________.

The student has put his/her best efforts.

_______________ ________________ _________________

Subject Teacher External Examiner Principal


ACKNOWLEDGEMENT
I would like to express my special thanks to my Computer Teacher
ANJALI PATHAK as well as our principal
Fr. Gregory Mascarenhas who gave me the golden opportunity to
do this project on the topic SHOE SHOP MANAGEMENT which
helped me in learning many new things I am really thankful to them.

Secondly, I would also like to thank my parents and friends who


helped me a lot in finalising this project within the limited time frame.
# List to store customer records
customers = []

def add_customer():
customer_id = input("Enter Customer ID: ")
name = input("Enter Name: ")
phone = input("Enter Phone: ")
email = input("Enter Email: ")
address = input("Enter Address: ")
price = float(input("Enter Price (total spent or credit limit): "))

customer = {
"customer_id": customer_id,
"name": name,
"phone": phone,
"email": email,
"address": address,
"price": price
}
customers.append(customer)
print(f"Customer '{name}' added successfully.")

def view_customers():
if not customers:
print("No customers available.")
else:
for customer in customers:
display_customer(customer)
def search_customer(customer_id):
for customer in customers:
if customer["customer_id"] == customer_id:
return customer
return None

def update_customer():
customer_id = input("Enter Customer ID to update: ")
customer = search_customer(customer_id)

if customer:
print("Enter new details (leave blank to keep current information):")
name = input("New Name: ") or customer["name"]
phone = input("New Phone: ") or customer["phone"]
email = input("New Email: ") or customer["email"]
address = input("New Address: ") or customer["address"]
price = input("New Price (leave blank to keep current): ") or customer["price"]
price = float(price) # Convert to float if updated

customer.update({"name": name, "phone": phone, "email": email, "address": address,


"price": price})
print(f"Customer '{customer_id}' updated successfully.")
else:
print("Customer not found.")

def delete_customer():
customer_id = input("Enter Customer ID to delete: ")
customer = search_customer(customer_id)

if customer:
customers.remove(customer)
print(f"Customer '{customer_id}' deleted successfully.")
else:
print("Customer not found.")

def display_customer(customer):
print(f"ID: {customer['customer_id']}, Name: {customer['name']}, Phone:
{customer['phone']}, Email: {customer['email']}, Address: {customer['address']}, Price:
{customer['price']}")

def save_records(filename="customers.txt"):
with open(filename, 'w') as file:
for customer in customers:
line = f"{customer['customer_id']},{customer['name']},{customer['phone']},
{customer['email']},{customer['address']},{customer['price']}\n"
file.write(line)
print("Customer records saved to file.")

def load_records(filename="customers.txt"):
try:
with open(filename, 'r') as file:
for line in file:
customer_id, name, phone, email, address, price = line.strip().split(',')
customer = {
"customer_id": customer_id,
"name": name,
"phone": phone,
"email": email,
"address": address,
"price": float(price) # Convert price back to float
}
customers.append(customer)
print("Customer records loaded from file.")
except FileNotFoundError:
print("No previous records found. Starting fresh.")

def generate_receipt():
customer_id = input("Enter Customer ID for receipt: ")
customer = search_customer(customer_id)

if customer:
items = []
total_amount = 0
print("Enter item details (type 'done' as item name to finish):")

while True:
item_name = input("Item Name: ")
if item_name.lower() == 'done':
break
quantity = int(input("Quantity: "))
price = float(input("Price per item: "))
amount = quantity * price
items.append((item_name, quantity, price, amount))
total_amount += amount

receipt_content = f"Receipt for {customer['name']} (ID: {customer['customer_id']})\n"


receipt_content += "---------------------------------------\n"
for item_name, quantity, price, amount in items:
receipt_content += f"{item_name} - Qty: {quantity}, Price: {price}, Amount: {amount}\
n"
receipt_content += "---------------------------------------\n"
receipt_content += f"Total Amount: {total_amount}\n"
filename = f"receipt_{customer_id}.txt"
with open(filename, 'w') as file:
file.write(receipt_content)

print("Receipt generated successfully!")


print(receipt_content)
else:
print("Customer not found.")

# Main Program
def main():
load_records()

while True:
print("\n--- Shoe Shop Customer Management ---")
print("1. Add Customer")
print("2. View Customers")
print("3. Search Customer by ID")
print("4. Update Customer")
print("5. Delete Customer")
print("6. Save Records")
print("7. Exit")
print("8. Generate Receipt")
choice = input("Enter your choice: ")

if choice == '1':
add_customer()

elif choice == '2':


view_customers()
elif choice == '3':
customer_id = input("Enter Customer ID to search: ")
customer = search_customer(customer_id)
if customer:
display_customer(customer)
else:
print("Customer not found.")

elif choice == '4':


update_customer()

elif choice == '5':


delete_customer()

elif choice == '6':


save_records()

elif choice == '7':


save_records()
print("Exiting... Goodbye!")
break

elif choice == '8':


generate_receipt()

else:
print("Invalid choice. Please try again.")

main()
OUTPUT

No previous records found. Starting fresh.

--- Shoe Shop Customer Management ---


1. Add Customer
2. View Customers
3. Search Customer by ID
4. Update Customer
5. Delete Customer
6. Save Records
7. Exit
8. Generate Receipt
Enter your choice: 1
Enter Customer ID: C001
Enter Name: priyansh
Enter Phone: 1234567890
Enter Email: priyansh@example.com
Enter Address: 123 Shoe Lane
Enter Price (total spent or credit limit): 200.0
Customer 'priyansh' added successfully.

--- Shoe Shop Customer Management ---


1. Add Customer
2. View Customers
3. Search Customer by ID
4. Update Customer
5. Delete Customer
6. Save Records
7. Exit
8. Generate Receipt
Enter your choice: 2
ID: C001, Name: priyansh, Phone: 1234567890, Email: priyansh@example.com, Address:
123 Shoe Lane, Price: 200.0

--- Shoe Shop Customer Management ---


1. Add Customer
2. View Customers
3. Search Customer by ID
4. Update Customer
5. Delete Customer
6. Save Records
7. Exit
8. Generate Receipt
Enter your choice: 3
Enter Customer ID to search: C001
ID: C001, Name:priyansh, Phone: 1234567890, Email: priyansh@example.com, Address: 123
Shoe Lane, Price: 200.0

--- Shoe Shop Customer Management ---


1. Add Customer
2. View Customers
3. Search Customer by ID
4. Update Customer
5. Delete Customer
6. Save Records
7. Exit
8. Generate Receipt
Enter your choice: 4
Enter Customer ID to update: C001
Enter new details (leave blank to keep current information):
New Name: abhigyan
New Phone:
New Email: abhigyan@example.com
New Address: 456 Fashion Street
New Price (leave blank to keep current): 250.0
Customer 'C001' updated successfully.

--- Shoe Shop Customer Management ---


1. Add Customer
2. View Customers
3. Search Customer by ID
4. Update Customer
5. Delete Customer
6. Save Records
7. Exit
8. Generate Receipt
Enter your choice: 2
ID: C001, Name: abhigyan, Phone: 1234567890, Email: abhigyan@example.com, Address:
456 Fashion Street, Price: 250.0

--- Shoe Shop Customer Management ---


1. Add Customer
2. View Customers
3. Search Customer by ID
4. Update Customer
5. Delete Customer
6. Save Records
7. Exit
8. Generate Receipt
Enter your choice: 5
Enter Customer ID to delete: C002
Customer not found.

--- Shoe Shop Customer Management ---


1. Add Customer
2. View Customers
3. Search Customer by ID
4. Update Customer
5. Delete Customer
6. Save Records
7. Exit
8. Generate Receipt
Enter your choice: 8
Enter Customer ID for receipt: C001
Enter item details (type 'done' as item name to finish):
Item Name: Running Shoes
Quantity: 2
Price per item: 50
Item Name: Socks
Quantity: 5
Price per item: 5
Item Name: done
Receipt generated successfully!
Receipt for Alice Cooper (ID: C001)
---------------------------------------
Running Shoes - Qty: 2, Price: 50.0, Amount: 100.0
Socks - Qty: 5, Price: 5.0, Amount: 25.0
---------------------------------------
Total Amount: 125.0

--- Shoe Shop Customer Management ---


1. Add Customer
2. View Customers
3. Search Customer by ID
4. Update Customer
5. Delete Customer
6. Save Records
7. Exit
8. Generate Receipt
Enter your choice: 6
Customer records saved to file.

--- Shoe Shop Customer Management ---


1. Add Customer
2. View Customers
3. Search Customer by ID
4. Update Customer
5. Delete Customer
6. Save Records
7. Exit
8. Generate Receipt
Enter your choice: 7
Customer records saved to file.
Exiting... Goodbye!
TEACHER’ REMARKS

TEACHER’S SIGNATURE
PRINCIPAL’SIGNATURE

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy