Create a C# console application for a bakery that includes the following functionality:
-
There should be two classes: one for Bread and one for Pastry.
-
When the user runs the application, they should receive a prompt with a welcome message along with the cost for both Bread and Pastry.
-
A user should be able to specify how many loaves of Bread and how many Pastrys they'd like.
-
The application will return the total cost of the order.
-
Pierre offers the following deals:
- Bread: Buy 2, get 1 free (every 3rd loaf of bread is free.). A single loaf costs $5, two loaves costs $10, and three loaves cost $10.
- Pastry: Buy 1 for $2 or 3 for $5. Four pastries costs $7, five pastries costs $9, and six pastries costs $10.
-
All functionality for the models should be tested.
- Code includes two custom classes and uses namespaces.
- Console application works correctly.
- Application correctly uses auto-implemented properties.
- Classes should include methods for determining the price of an order.
- Models are thoroughly tested.
- Project is in a polished, portfolio-quality state.
- The prompt’s required functionality and baseline project requirements are in place by the deadline.
Minimum Product Features | |
---|---|
✔️ | User can enter the amount of loaves and pastries they'd like |
✔️ | Pierre's Deals applied |
✔️ | Return total cost of order |
-
Clone this projects repository into your local directory following these instructions.
-
Navigate to project directory from your terminal by entering the following:
cd PierresBakery.Solution
-
Install
Microsoft .NET SDK 5.0
-
Navigate to PierresBakery directory and run
$ dotnet run
in your terminal. -
For testing navigate to PierresBakery.Tests and run
$ dotnet test
in your terminal.
- Any known issues
- MIT
© Filmer Tolentino 2022