Challenge: Inventory Management System
Swipe to start coding
Build a C# program that manages a store's inventory using a dictionary. The program should allow adding products with their quantities, restocking products, and listing products that are currently out of stock.
- Add a product with a specified quantity to the inventory.
- If a product already exists, increase its quantity by the specified amount.
- Restock a product by increasing its quantity in the inventory.
- If a product does not exist when restocking, add it with the specified quantity.
- Return a list of products that have a quantity of zero.
Ratkaisu
Kiitos palautteestasi!
single
Kysy tekoälyä
Kysy tekoälyä
Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme
Can you explain this in simpler terms?
What are the main takeaways from this?
Can you give me a real-world example?
Mahtavaa!
Completion arvosana parantunut arvoon 4.76
Challenge: Inventory Management System
Pyyhkäise näyttääksesi valikon
Swipe to start coding
Build a C# program that manages a store's inventory using a dictionary. The program should allow adding products with their quantities, restocking products, and listing products that are currently out of stock.
- Add a product with a specified quantity to the inventory.
- If a product already exists, increase its quantity by the specified amount.
- Restock a product by increasing its quantity in the inventory.
- If a product does not exist when restocking, add it with the specified quantity.
- Return a list of products that have a quantity of zero.
Ratkaisu
Kiitos palautteestasi!
single