import java.awt.*;
import javax.swing.*;

public class Applet_Circle extends JApplet {
    // A simple applet demonstrates the Circle class for GEO 511

    Circle circ;

    public void init() {
        // Call the constructor to create an instance of Circle
        circ = new Circle();

        // Change the values of the fields
        circ.xCenter = 100;
        circ.yCenter = 144;
        circ.radius = 50.0;
    }

    public void paint(Graphics g) {
        // paint(Graphics g) method draws on the screen
        // Display a heading
        g.drawString("*** The GEO 511 Circle ***", 10, 20);

        // Display the values of the fields
        g.drawString("xCenter = " + circ.xCenter, 10, 40);
        g.drawString("yCenter = " + circ.yCenter, 10, 60);
        g.drawString("radius = " + circ.radius, 10, 80);

        // Display the values computed by the methods
        g.drawString("circumference = " + circ.circumference(), 10, 100);
        g.drawString("area = " + circ.area(), 10, 120);

    }
}
