Complete-Python-Mastery icon indicating copy to clipboard operation
Complete-Python-Mastery copied to clipboard

E-commerce Billing System Assignment

Open Pankaj-Str opened this issue 1 year ago • 0 comments

Objective:

Create an advanced billing system for an e-commerce application that allows users to input product details, apply GST, select discount offers, and calculate the final bill. The system should provide a detailed invoice with a breakdown of each item, taxes, discounts, and the total amount.

Requirements:

  1. Product Input:

    • Allow the user to input multiple product details including:
      • Product ID
      • Product Name
      • Quantity
      • Unit Price
  2. GST Calculation:

    • Apply GST (Goods and Services Tax) to each product. GST rates should be variable and user-defined (e.g., 5%, 12%, 18%, 28%).
  3. Discount Offers:

    • Allow the user to select from various discount offers:
      • Percentage Discount on the total bill (e.g., 5%, 10%, 15%)
      • Fixed Amount Discount on the total bill (e.g., $10, $20)
      • Discount on specific products (e.g., 10% off on Product A)
  4. Invoice Generation:

    • Generate a detailed invoice including:
      • Product details (Product ID, Name, Quantity, Unit Price, Subtotal)
      • GST applied
      • Discounts applied
      • Total amount before and after tax and discounts
  5. User Interface:

    • Create a simple text-based menu-driven interface to interact with the system.
    • Provide options to:
      • Add a new product
      • View all products
      • Apply GST
      • Apply Discounts
      • Generate and view the final invoice
  6. Data Validation:

    • Ensure data validation for user inputs (e.g., numeric values for prices and quantities, valid GST rates).

Example Workflow:

  1. Add Products:

    Enter Product ID: 101
    Enter Product Name: Laptop
    Enter Quantity: 2
    Enter Unit Price: 750.00
    
  2. Apply GST:

    Enter GST rate (%): 18
    
  3. Apply Discounts:

    Select Discount Type:
    1. Percentage Discount on Total Bill
    2. Fixed Amount Discount on Total Bill
    3. Discount on Specific Product
    Enter Choice: 1
    Enter Discount Rate (%): 10
    
  4. Generate Invoice:

    -----------------------------------
    E-commerce Billing System Invoice
    -----------------------------------
    Product ID: 101
    Product Name: Laptop
    Quantity: 2
    Unit Price: $750.00
    Subtotal: $1500.00
    GST @ 18%: $270.00
    -----------------------------------
    Total before discount: $1770.00
    Discount @ 10%: $177.00
    -----------------------------------
    Final Total: $1593.00
    -----------------------------------
    

Submission:

Submit the Python script implementing the advanced billing system. Ensure your code is well-documented with comments explaining each part of the logic. Include a README file explaining how to run your program and any dependencies required.

Evaluation Criteria:

  • Correctness and completeness of the implemented features
  • Code readability and documentation
  • Handling of edge cases and data validation
  • User interface and user experience

Pankaj-Str avatar Jul 20 '24 13:07 Pankaj-Str