import java.applet.Applet; import java.awt.*; public class Sine extends Applet { int width, height; public void init () { Dimension d = size (); width = d.width; height = d.height; } public void paint ( Graphics g ) { int x, x0; double y0, y, A, f, t, offset; A = (double) height / 4; f = 2; offset = (double) height / 2; x0 = 0; y0 = offset; g.drawLine ( x0, (int) y0, width, (int) y0 ); g.drawLine ( width/2, 0, width/2, height ); for ( x=0; x