Exemplo n.º 1
0
        public int CompareTo(IInstrument other)
        {
            if (other == null)
            {
                return(1);
            }
            Piano otherFlute = (Piano)other;

            return(InstrumentName.CompareTo(otherFlute.InstrumentName) +
                   InstrumentGroup.CompareTo(otherFlute.InstrumentGroup) +
                   InstrumentValue.CompareTo(otherFlute.InstrumentValue) +
                   IsAntiquity.CompareTo(otherFlute.IsAntiquity) +
                   PianoBrand.CompareTo(otherFlute.PianoBrand) +
                   PianoType.CompareTo(otherFlute.PianoType));
        }
Exemplo n.º 2
0
        public int CompareTo(IInstrument other)
        {
            if (other == null)
            {
                return(1);
            }
            Guitar otherFlute = (Guitar)other;

            return(InstrumentName.CompareTo(otherFlute.InstrumentName) +
                   InstrumentGroup.CompareTo(otherFlute.InstrumentGroup) +
                   InstrumentValue.CompareTo(otherFlute.InstrumentValue) +
                   IsAntiquity.CompareTo(otherFlute.IsAntiquity) +
                   GuitarBrand.CompareTo(otherFlute.GuitarBrand) +
                   GuitarType.CompareTo(otherFlute.GuitarType));
        }
Exemplo n.º 3
0
        public int CompareTo(IInstrument other)
        {
            if (other == null)
            {
                return(1);
            }
            Flute otherFlute = (Flute)other;

            return(InstrumentName.CompareTo(otherFlute.InstrumentName) +
                   InstrumentGroup.CompareTo(otherFlute.InstrumentGroup) +
                   InstrumentValue.CompareTo(otherFlute.InstrumentValue) +
                   IsAntiquity.CompareTo(otherFlute.IsAntiquity) +
                   FluteBrand.CompareTo(otherFlute.FluteBrand) +
                   Material.CompareTo(otherFlute.Material) +
                   FluteType.CompareTo(otherFlute.FluteType));
        }