using System; using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; namespace warehouse { internal class Warehouse { private string name; private int warenbestand; private int kassenbestand; public Warehouse(string name, int filialen, int warenbestand, int kassenbestand) { this.name = name; this.warenbestand = warenbestand; this.kassenbestand = kassenbestand; } public void Einkauf() { if (this.kassenbestand >= 10) { this.kassenbestand -= 10; this.warenbestand++; Console.WriteLine($"Kauf ist erfolgt"); } else { Console.WriteLine("Kauf konnte nicht durchgeführt werden."); } } public void Verkauf() { if (this.warenbestand > 0) { this.kassenbestand += 20; this.warenbestand--; Console.WriteLine("Ware wurde verkauft."); } else { Console.WriteLine("Keine Ware vorhanden."); } } public void PrintInfo() { Console.Write($"Name der Kette: {this.name}, Der Warenbestand beträgt: {this.warenbestand} der Kassenbestand beträgt: {this.kassenbestand}"); } } }