static void Main(string[] args) { Refill refill = new Refill(); ChewingGums[] gumDispenser = new ChewingGums[55]; Menu menu = new Menu(); menu.welcomeScreen(); Console.ReadKey(); }
public void fillDispenser() { GumDispendser = new ChewingGums[55]; //Fills the array with gum for (int i = 0; i < 55; i++) { if (i <= 13) { //25% GumDispendser[i] = new ChewingGums("BlueBerry", "Blue"); } else if (i > 13 && i <= 20) { //14% GumDispendser[i] = new ChewingGums("StrawBerry", "Red"); } else if (i > 20 && i <= 25) { //10% GumDispendser[i] = new ChewingGums("Appel", "Green"); } else if (i > 25 && i <= 35) { //19% GumDispendser[i] = new ChewingGums("Orange", "Orange"); } else if (i > 35 && i <= 46) { //20% GumDispendser[i] = new ChewingGums("TuttiFrutti", "Yellow"); } else if (i > 46 && i <= 52) { //12% GumDispendser[i] = new ChewingGums("BlackBerry", "Purpel"); } else if (i > 52) { //Fills the 2 last empty spots in the array GumDispendser[i] = new ChewingGums("TuttiFrutti", "Yellow"); } } }