public void AddGuitar(String serialNumber, double price, Builder builder, String model, Type type, Wood backWood, Wood topWood, int numStrings) { GuitarSpec guitarSpec = new GuitarSpec(type, builder, backWood, topWood, model, numStrings); Guitar guitar = new Guitar(serialNumber, price, guitarSpec); guitars.Add(guitar); }
public Guitar GetGuitar(String serialNumber) { foreach (var item in guitars) { Guitar guitar = (Guitar)item; if (guitar.SerialNumber.Equals(serialNumber)) { return(guitar); } } return(null); }