/*
 * NotaMusical.java
 *
 * Created on April 9, 2003, 7:08 AM
 */

package cib412.poo.musica;

/**
 *
 * @author  do008548
 */
public class NotaMusical {
    
    public static final int DO = 1;
    
    public static final int RE = 2;
    
    public static final int MI = 3;
    
    public static final int FA = 4;
    
    public static final int SOL = 5;
    
    public static final int LA = 6;
    
    public static final int SI = 7;
    
    /** Holds value of property valor. */
    private int valor;
    
    private final String[] nombres = {"DO","RE","MI",
    "FA","SOL","LA","SI"};
    
    /** Creates a new instance of NotaMusical */
    public NotaMusical() { this.valor=0;}
    
    public NotaMusical(int valor) {
        this.valor=valor;
    }
    
    /** Getter for property valor.
     * @return Value of property valor.
     */
    public int getValor() {
        return this.valor;
    }
    
    /** Setter for property valor.
     * @param valor New value of property valor.
     */
    public void setValor(int valor) {
        this.valor = valor;
    }
    
    public String sonar() {
        String equivalente="";
        if (valor>=DO && valor <=SI) 
            equivalente = nombres[valor-1];
        return equivalente;
             
    }
    
}




