public void Add(Presents present) { if (Capacity > Count) { data.Add(present); } }
public Presents GetPresent(string name) { Presents currentPresent = data.FirstOrDefault(x => x.Name == name); return(currentPresent); }
public Presents GetHeaviestPresents() { Presents heaviestPresents = data.OrderByDescending(x => x.Weight).FirstOrDefault(); return(heaviestPresents); }
public bool Remove(string name) { Presents present = data.FirstOrDefault(x => x.Name == name); return(data.Remove(present)); }