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); }
public Instrument(string serialNumber, double price, InstrumentSpec spec) { this.serialNumber = serialNumber; this.price = price; this.spec = spec; }