Good, we have seen a bit of object-oriented programming in javascript and have sent us to do an exercise to use inheritance. You have to calculate the volume of a cylinder in which we have to use the radius of a circle from a previous exercise. But I do not think I'm using it well because it does not show me anything.
Code js calculate volume:
function calcularVolumenCilindro()
{
var radio = Circulo.prototype.radio = getRadio();
var altura = prompt("Introduce altura del cilindro: ")
var volumen = volumenCilindro(radio,altura);
document.write("El volumen del cilindro es: "+volumen);
}
Code js volumeCylinder:
function volumenCilindro(radio,altura)
{
return Math.PI*radio*radio*altura;
}
Am I using the correct way to call the getRadio () method of another exercise class?