This project is a C# implementation of a price calculator, which can perform the following operations on a list of products:
- Calculate taxes based on a given tax rate.
- Apply discounts based on a given discount rate or specific UPC discounts.
- Apply expenses based on a percentage or monetary value.
- Apply a cap to the final price.
This project assumes familiarity with the C# programming language, particularly object-oriented programming concepts like classes, interfaces, and inheritance. It also assumes familiarity with the .NET Framework and Visual Studio, as the project is built using these technologies.
The Program.cs
file contains sample code demonstrating how to use the price calculator to perform various operations on a list of products. The following operations are demonstrated:
- Calculating taxes on a product.
- Applying a discount to a product.
- Applying a selective discount to a product based on a UPC code.
- Applying multiple discounts to a product, where the discount with the highest amount is applied.
- Applying expenses to a product.
- Applying a cap to the final price of a product.
To use the price calculator, follow these steps:
- Clone the repository.
- Open the solution in Visual Studio.
- Build the solution.
- Run the
PriceCalculator
project.
Contributions are welcome! If you find a bug or want to add a feature, please open an issue or submit a pull request.
This project was created by Mohammad Othman.