/*
 * Peca.java
 *
 * Created on 22 de Setembro de 2006, 20:48
 *
 * To change this template, choose Tools | Options and locate the template under
 * the Source Creation and Management node. Right-click the template and choose
 * Open. You can then make changes to the template in the Source Editor.
 */

package exemplocomposite;

/**
 *
 * @author 203620
 */
public class Peca extends Componente{
    private Float preco;
    /** Creates a new instance of Peca */
    public Peca(String nome,Float preco){
        super(nome);
        this.setPreco(preco);
    }
    
    public void setPreco(Float preco)
    {
        this.preco = preco;
    }
    
    public void adicionar(Componente p)
    {
        
    }
    
    public Float obterPreco(){
        return preco;
    }
}
