コード例 #1
0
 public bool override matches(InstrumentSpec otherSpec)
 {
     if (!base.matches(otherSpec))
     {
         return(false);
     }
     if (!(otherSpec is GuitarSpec))
     {
         return(false);
     }
     if (numStrings != otherSpec.numStrings)
     {
         return(false);
     }
     return(true);
 }
コード例 #2
0
 public Instrument(string serialNumber, double price, InstrumentSpec spec)
 {
     this.serialNumber = serialNumber;
     this.price        = price;
     this.spec         = spec;
 }