Академический Документы
Профессиональный Документы
Культура Документы
return this.lado1;
}
public void setLado1(double valor)
{
this.lado1=valor;
}
public double getLado2()
{
return this.lado2;
}
public void setLado2(double valor)
{
this.lado2=valor;
}
public void calcularArea()
{
this.area=(this.getBase()*this.getAltura())/2;
}
public void calcularPerimetro()
{
this.perimetro=this.getLado1()+this.getLado2()+this.getBase();
}
public void imprimirDatos()
{
System.out.println("Base: "+this.getBase());
System.out.println("Altura: "+ this.getAltura());
System.out.println("Lado 1: "+this.getLado1());
System.out.println("Lado 2: "+this.getLado2());
super.imprimirDatos();
}
}