public string name { get; set; }
public decimal price { get; set; }
public override string ToString()
return "ID: " + name + " price: " + price;
String MenyWelcomephrase = "Hello and welcome to the SodaMachine, choose what you want to do by entering the number of the option.";
String MenyOptions = "\nOptions:\n1.Stock the sodamachine\n2.Buy Soda\n3.Another option\n4.Exit the program";
string SodaStockWelcomePhrase = "Here you can populate your soda machine whit sodas! Great right!? you stock the machine by entering the number of the soda and then type the amount of sodas";
string SodastockOptions = "\nOptions:\n1.Cola\n2.Fanta\n3.Pepsi\nRamlösa";
static Soda[] SodaStock = new Soda[99];
static void Main(string[] args)
var programInstance = new Program();
Console.Write(MenyWelcomephrase);
Console.WriteLine(MenyOptions);
bool intValue = int.TryParse(Console.ReadLine(), out caseSwitch);
Console.WriteLine("Soda machine stocker");
Console.WriteLine("Buy a soda");
Console.WriteLine("Make the soda machine say hello");
Console.WriteLine("exit the soda machine");
Console.WriteLine("Please enter a intergervalue");
else if (caseSwitch > 4 || caseSwitch < 1)
Console.WriteLine("Please enter a value between 1 and 4");
Console.WriteLine("Something went wrong and we dont know what... did you enter a value of between 1-4?");
public (int, int, int, int) sodaCounter(Soda[] x)
if (soda.name == "Pepsi")
if (soda.name == "Fanta")
if (soda.name == "Ramlösa")
return (colaCounter,pepsiCounter,fantaCounter,ramlosaCounter);
public void SodaPopulator()
Soda[] sodaArray = new Soda[99];
if (SodaStock.Any() == false)
Console.WriteLine("The soda machine is empty!");