Exemplo n.º 1
0
 public void Add(PrecioiusStone el)
 {
     if (isFull())
     {
         return;
     }
     an[count++] = el;
 }
 public void Add(PrecioiusStone el)
 {
     if (isFull())
     {
         throw new ExceptionFull("Necklace is full");
     }
     an[count++] = el;
 }
Exemplo n.º 3
0
        public void Del(PrecioiusStone el)
        {
            int num = 0;

            if (isEmpty())
            {
                return;
            }
            for (int i = 0; i < count; i++)
            {
                if (an[i].Equals(el))
                {
                    num = i;
                }
            }
            for (int i = num; i < count; i++)
            {
                an[i] = an[i + 1];
            }
            count--;
        }
        public void Del(PrecioiusStone el)
        {
            int num = 0;

            if (isEmpty())
            {
                throw new ExceptionFull("Necklace is Empty");
            }
            for (int i = 0; i < count; i++)
            {
                if (an[i].Equals(el))
                {
                    num = i;
                }
            }
            for (int i = num; i < count; i++)
            {
                an[i] = an[i + 1];
            }
            count--;
        }