From AshaK28692@aol.com  Sun May  7 20:34:49 2000
Return-Path: <AshaK28692@aol.com>
Received: from imo-d07.mx.aol.com (imo-d07.mx.aol.com [205.188.157.39])
	by turing.cs.hmc.edu (8.9.3+Sun/8.9.3) with ESMTP id UAA06955
	for <keller@cs.hmc.edu>; Sun, 7 May 2000 20:34:48 -0700 (PDT)
From: AshaK28692@aol.com
Received: from AshaK28692@aol.com
	by imo-d07.mx.aol.com (mail_out_v26.7.) id 8.7f.404207c (4196)
	 for <keller@cs.hmc.edu>; Sun, 7 May 2000 23:33:43 -0400 (EDT)
Message-ID: <7f.404207c.26478f96@aol.com>
Date: Sun, 7 May 2000 23:33:42 EDT
Subject: (no subject)
To: keller@turing.cs.hmc.edu
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="part1_7f.404207c.26478f96_boundary"
X-Mailer: AOL 4.0 for Windows 95 sub 100
Status: OR


--part1_7f.404207c.26478f96_boundary
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit

 

--part1_7f.404207c.26478f96_boundary
Content-Type: text/plain; name="QUILT1~1.JAV"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline; filename="QUILT1~1.JAV"

//CS5-HMC-Sp.,00-HW5-4
//A. Khakpour, May, 00

import java.applet.*;
import java.awt.*;

public class Quilt1 extends Applet
{
   private final int GS =3D 12;      //Grid Size
   private final int CS =3D 24;      //Cell Size

   public void paint(Graphics g)
   {
      int x, y;
      setBackground (Color.black);
      for (int row=3D1; row <=3D GS; row++)
      {
         y =3D row * CS;
         for (int col=3D1; col <=3D GS; col++)
         {
            x =3D col * CS;
            g.setColor (Color.magenta);
            g.fillRect (x, y, CS, CS);
            g.setColor (Color.cyan);
            g.fillOval (x, y, CS, CS);
            g.setColor (Color.yellow);
            g.fillOval (x+CS/8, y+CS/8, 3*CS/4, 3*CS/4);
            g.setColor (Color.red);
            g.fillOval (x+CS/4, y+CS/4, CS/2, CS/2);
            g.setColor (Color.black);
            g.drawLine (x, y+CS/2, x+CS, y+CS/2);
            g.drawLine (x+CS/2, y, x+CS/2, y+CS);
         }
      }
   }
}

--part1_7f.404207c.26478f96_boundary--

