JAVA CODE
//Test1 program import java.awt.*; import java.applet.Applet; public class Test1 extends Applet { public void paint(Graphics g) { double vol = cubeVolume(1.2); showStatus(" Volume = "+vol); } private double cubeVolume( double x ) { return x*x*x; } }