Exemple #1
0
 public void Insert(string input, int index) //вставка в заданный пользователем индекс
 {
     if (index < counter)
     {
         for (int i = counter; i >= index; i--)
         {
             customers[i + 1] = customers[i];
         }
         customers[index] = new Orderer(input);
         counter++;
     }
     else
     {
         if (index == counter || index > counter && index < size)
         {
             Add(input);
             counter++;
         }
     }
 }
Exemple #2
0
 public void Add(string name)//операция добавления
 {
     counter++;
     customers[counter] = new Orderer(name);
 }
Exemple #3
0
 public Shop()
 {
     size      = 25;
     customers = new Orderer[size];
     counter   = -1;
 }