Welcome to the BestBuy Tech Equipment Store Engine repository! This Python-based project provides the functionality for managing a tech equipment store like "Best Buy." With this engine, you can list products, manage inventory, and place orders seamlessly. 💻✨
The store operates with a simple and user-friendly menu interface:
Store Menu
----------
1. List all products in store
2. Show total amount in store
3. Make an order
4. Quit
-
List Products:
1. MacBook Air M2, Price: $1450, Quantity: 100 2. Bose QuietComfort Earbuds, Price: $250, Quantity: 500 3. Google Pixel 7, Price: $500, Quantity: 250
-
Total Items in Store:
Total of 850 items in store
-
Make an Order:
Which product # do you want? 1 What amount do you want? 50 Product added to list! Order made! Total payment: $72500
-
Quit the Application.
-
Product Management:
- Add or remove products.
- Manage product quantities and status.
- Activate or deactivate products automatically based on inventory.
-
Store Management:
- Maintain a list of active products.
- Check the total inventory quantity.
- Process multiple orders in one transaction.
-
User Interface:
- Simple and intuitive command-line interface.
- Handle edge cases such as invalid inputs or out-of-stock items gracefully.
main.py
: Entry point for the application. Manages the user interface.products.py
: Contains theProduct
class for handling individual product details.store.py
: Contains theStore
class for managing product collections and order processing.
- Python 3.7 or later
- Git for version control
-
Clone the Repository:
git clone https://github.com/yourname/bestbuy.git cd bestbuy
-
Run the Application:
python main.py
Represents individual products in the store.
-
Attributes:
name
: Name of the product.price
: Price of the product.quantity
: Available stock.active
: Active status of the product.
-
Key Methods:
buy(quantity)
: Handles product purchase and updates stock.show()
: Displays product details.activate()/deactivate()
: Toggles the active status.
Handles a collection of products and order management.
-
Attributes:
products
: List of activeProduct
instances.
-
Key Methods:
add_product(product)
: Adds a product to the store.remove_product(product)
: Removes a product from the store.get_total_quantity()
: Returns the total inventory.order(shopping_list)
: Processes multiple product orders.
-
Initialize Git Repository:
git init git add . git commit -m "Initial commit" git branch -M main git remote add origin https://github.com/yourname/bestbuy.git git push -u origin main
-
Regular Commits:
- Commit after implementing each feature:
git add . git commit -m "Implemented [feature]" git push
- Commit after implementing each feature:
-
Clone for Deployment:
- Clone the repository to Codio or another environment to ensure all functionality works as expected.
- Test ordering a quantity larger than available stock.
- Verify behavior when a product runs out of stock.
- Check for invalid parameters during product creation.
- Version Control: Maintain a clear history of changes.
- Portfolio Building: Showcase your work to potential employers.
- Deployment Preparation: Learn real-world practices for managing and deploying code.
Contributions are welcome! Please open an issue or submit a pull request with detailed comments.
This project is licensed under the BSD3 License.
Happy Coding! 🚀💻