Beispiel #1
0
        public List <Guitar> Search(GuitarSpec aGuitarSpec)
        {
            List <Guitar> aReturn = new List <Guitar>();

            for (int i = 0; i < Chitare.Count; i++)
            {
                if (Chitare[i].Spec.Matches(aGuitarSpec))
                {
                    aReturn.Add(Chitare[i]);
                }
            }
            return(aReturn);
        }
Beispiel #2
0
 public Boolean Matches(GuitarSpec aGuitarSpec)
 {
     if (Builder == aGuitarSpec.Builder &&
         (
             (aGuitarSpec.Model == "") ||
             (Model.ToLower() == aGuitarSpec.Model.ToLower())
         ) &&
         Type == aGuitarSpec.Type &&
         BackWood == aGuitarSpec.BackWood &&
         TopWood == aGuitarSpec.TopWood
         )
     {
         return(true);
     }
     return(false);
 }
Beispiel #3
0
 public Guitar(string serialNumber, double price, GuitarSpec spec)
 {
     this.SerialNumber = serialNumber;
     this.Price        = price;
     this.Spec         = spec;
 }