public static IInstrumentoFactoryMethod CriaFabrica(InstrumentoType instrumentoType) { switch (instrumentoType) { case InstrumentoType.Violao: { return(new ViolaoFactory()); } case InstrumentoType.Guitarra: { return(new GuitarraFactory()); } case InstrumentoType.ContraBaixo: { return(new ContraBaixoFactory()); } default: throw new ArgumentOutOfRangeException(nameof(instrumentoType), instrumentoType, null); } }
protected InstrumentoCordaBase(string modelo, InstrumentoType instrumentoType, short numeroCordas) { InstrumentoType = instrumentoType; NumeroCordas = numeroCordas; Modelo = modelo; }