Complete a Sample project in .NET
- Status: Closed
- Prize: $100
- Entries Received: 5
- Winner: vladom81
Contest Brief
General Instructions
1. Use Visual Studio 2019
2. Use .NET Core
3. Use the latest C# language features (dependency Injection, Separation of Layers, Unit Tests). This is must. Do not submit solution with just one project in it. Need to have Servicelayer, Models etc. Use DI where you think is applicable.
Problem Statement: Need a sample Vending Machine application. Simple console application is fine. The main thing is to use above guidelines along with SOLID principles. Need to use async Tasks/Parallel Linq to take advantage of Parallel programming !!
The vending machine should start with the following inventory:
1 Coke: Quantity=10; Price=$1.25
2 M&M’s: Quantity=15; Price=$1.89
3 Water: Quantity=5; Price=$.89
4 Snickers: Quantity=7; Price=$2.05
where 1, 2, 3 & 4 are the unique Item Numbers.
You can store these in a csv file.
• The console application should accept the following two commands:
1. inv
2. order <amount> <item_number> <Quantity>
• Command 1: inv
Displays the current inventory in format: {Item Number} {Item Desc} {Quantity} {Price}
For example:
1 Coke (10): $1.25
2 M&M’s (15): $1.89
3 Water (5): $.89
4 Snickers (7): $2.05
• Command 2: order <amount> <item_number> <Quantity>
This command is used to place an order for an item. User would enter order followed by the above params.
For example, this is how to buy three packs of M&M’s from the vending machine
order 5.67 2 3
To keep it simple, require exact change (for now)
Tell the user if their order was successful. If the order was not successful, tell the user why.
Need the final code by Sunday 9PM IST
Recommended Skills
Top entries from this contest
-
vladom81 Croatia
-
pulkitgupta317 India
-
Giri2198 India
-
ganeshrasekar India
Public Clarification Board
How to get started with contests
-
Post Your Contest Quick and easy
-
Get Tons of Entries From around the world
-
Award the best entry Download the files - Easy!