/*
 * TestInstrumentoMusical.java
 *
 * Created on April 9, 2003, 8:13 AM
 */

package cib412.poo.musica;

/**
 *
 * @author  do008548
 */
public class TestInstrumentoMusical {
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        PartituraMusical rola = new PartituraMusical(5);
        try {
         rola.agregar(new NotaMusical(NotaMusical.DO));
         rola.agregar(new NotaMusical(NotaMusical.MI));
         rola.agregar(new NotaMusical(NotaMusical.SOL));
         rola.agregar(new NotaMusical(NotaMusical.SI));
         rola.agregar(new NotaMusical(NotaMusical.SI));
         rola.agregar(new NotaMusical(NotaMusical.SI));
         InstrumentoMusical piano = new InstrumentoMusical("piano");
         System.out.println("Instrumento "+piano.getTipo());  
         piano.ejecutar(rola);
        } catch (Exception ex) {
          String error=ex.getMessage();   
          if (PartituraMusical.ERRORAGREGAR.equals(error)) {
               System.out.println("Excediste el numero de notas");
          }
        }
        
    }
    
}
