import javax.swing.JOptionPane;

public class Pyramid implements IGeometry {

	private double base;
	private double height;
	
	public Pyramid() {
		String userInput = "";

		userInput = JOptionPane.showInputDialog("Enter base ");
		base = Double.parseDouble( userInput );

		userInput = JOptionPane.showInputDialog("Enter height ");
		height = Double.parseDouble( userInput );
	}

	public double perimeter() {
		return( base * 4.0 );
	}
	
	public double area() {
		return( .5 * base * height );
	}
	
	public double volume(){
		return( (base * height) / 3.0 );
	}
	
	public void identify() {
		System.out.println("I am a PYRAMID");
	}	
					
} // end class

