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; }
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--; }