- C#
- .NET
- MSTest
- Git
Users are given a welcome message and a price list for bread and pastry. Bread is $5 with a discount of 3 for the price of 2, while pastry is $2 with a 4 for 3 discount. User is then asked to enter a number for loaves of bread to order, followed by a prompt to enter the number of pastries. The application then prints the total cost of the order
- Clone this repository
- Navigate to the Bakery directory
- In a terminal window, run:
dotnet restore
dotnet run
- Install MSTest
- Navigate to the Bakery.Tests directory
- In the terminal window, enter:
dotnet test
No known bugs at this time.
- Allow users to buy different kinds of Bread and Pastry.
- Add additional deals.
- Use class inheritance to DRY up code for the Bread and Pastry class.
- Allow users to keep adding to an order by using static variables.
- There should be two classes: one for Bread and one for Pastry.
- Bread class should calculate cost of bread a with buy 2, get 1 free deal
- Pastry class should calculate cost of bread a with buy 3, get 1 free deal
- Prompt should show welcome message and bread/pastry prices
- Capture user input for number of loaves/pastries
- Calculate total cost of order
- $5/each
- Buy 2, get 1 free
- $2/each
- Buy 3, get 1 free
MIT License
Copyright (c) 2023 Mike Wilkes
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.