import java.awt.*; //uses abstract library
import java.applet.Applet; //used applets
public class javaCircleFloat extends Applet //file name, class, and how
{ //opens class
public void paint (Graphics g) //uses graphics
{ //open void
float radius; //declarations
float circumference;
float area;
float volume;
radius = 7.5f;
circumference = 2.0f * (float)Math.PI * radius;
area = (float)Math.PI * radius * radius;
volume = 4.0f * (float)Math.PI * radius * radius * radius / 3;
g.drawString("The radius is " +radius, 5, 10); //displays length
g.drawString("The circumference is " +circumference, 5, 30); //width
g.drawString("The area is " +area, 5, 50); //height
g.drawString("The Volume of the cube with these dimensions is " +volume, 5, 70);
}
}

Copyrighted Material by vmyvnesd