forked from MugilanGN/Flowchart-Generator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUntitled-1.txt
More file actions
26 lines (23 loc) · 1.29 KB
/
Untitled-1.txt
File metadata and controls
26 lines (23 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Define a class Product:
Define __init__ method to initialize name, price, location, and inventory attributes
Define a class InventoryManager:
Define __init__ method to initialize products list and load inventory from file
Define load_inventory method to read inventory data from file and create Product objects
Define update_inventory_file method to write updated inventory back to the file
Define display_products method to display all products with their details
Define purchase_product method to allow a customer to purchase a product and update inventory
Define generate_packing_slip method to create a packing slip for the warehouse
Sort products by location (aisle, shelf, bin)
Create a packing slip listing each product, quantity, and location
Define main function:
Initialize inventory_manager with the inventory file
Print welcome message and prompt for customer details
Loop until the user chooses to exit:
Display available products
Prompt the user for the product they want to purchase and quantity
Purchase the product and update inventory
Generate a packing slip for the customer's order
Display the packing slip
Update the inventory file
Print a thank you message
Call the main function