Programming Resources
For Fun and Learning
Charles Cusack
Computer Science
Hope College
main

Python
C++

JAVA


PHP
SQL
Alice

DrawingExample


Oval.java

import java.awt.*;

/**
 * Write a description of class Oval here.
 * 
 * @author Chuck Cusack
 * @version 1.0, September, 2005
 */
public class Oval extends BasicShape
{
    public Oval() {
      super();
    }
	public Oval(int x, int y, int width, int height,
	                       Color color, boolean isFilled) {
	    super(x,y,width,height,color,isFilled);
	}
		
    /**
     * Overriding the drawFilledShape method from BasicShapes
     * so we can draw our filled oval.
     */
	public void drawFilledShape(Graphics g) {
	    g.fillOval(x,y,width,height);
	}
    /**
     * Overriding the drawFilledShape method from BasicShapes
     * so we can draw our oval.
     */
	public void drawHollowShape(Graphics g) {
	    g.drawOval(x,y,width,height);
	}
}