// Cylinder class
// I NEED INHERITANCE THIS PROGRAM
// I NEED HELP PLEASE!!!!!!!!!!!
public class Cylinder
{
private double height;
private double radius;
public Cylinder(double radius, double height)
{
this.radius = radius;
this.height = height;
}
// Calculate the volume
public double volumeCylinder()
{
double volume = Math.PI * Math.pow(radius,2.0) *height;
return volume;
}
// Calculate the surface
public double SurfaceArea()
{
double diameter = 2 * radius;
double circumference = Math.PI * diameter;
double circleArea = Math.PI *Math.pow(radius,2.0);
double areaCylinder = (2 * circleArea) +(circumference * height);
return areaCylinder;
}
public double Radius()
{
return this.radius; // find radius
}
public double Height()
{
return this.height; // find the height
}
public void Height(double h)
{
PayPal Gateway not configured
PayPal Gateway not configured