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

Python
C++

JAVA


PHP
SQL
Alice

TargetGame


Description

Run it
Download jar file (Right click)

ABullet.java
AClip.java
AClipGun.java
ATarget.java
AppletStarter.java
BulletTimer.java
GameTimer.java
LSBullet.java
LSClip.java
LSGun.java
ResetButton.java
TargetGame.java
TargetTimer.java

ABullet.java

//-----------------------------------------------------------------------------
// Class: 	ABullet
// Author:	Written by Chuck Cusack
// Date: 	September 2001
// Description: the ABullet class represents a bullet that can be placed in an
// 	AClip. This class does not contain any graphics, and it is intended
//      that the user extend this class to diplay the bullet as they desire.
//
//-----------------------------------------------------------------------------
import java.awt.*;
import java.awt.event.*;
import aLibrary.*;
//-----------------------------------------------------------------------------

public abstract class ABullet extends AView {

//-----------------------------------------------------------------------------
// The constructor.
// postcondition: Draws and empty AView of the specified size.
// 	Will only draw something if subclass is defined and implements
//	the methods listed below.
//
  public ABullet(int x,int y,int width,int height) {
      super(x,y,width,height);
      drawBullet();
  }
//-----------------------------------------------------------------------------
// Implement the following functions in the subclass so they display
// and move the bullet as you wish.
//
  protected void drawBullet() {}
  protected void drawBulletFiring(TargetGame D) {}
//-----------------------------------------------------------------------------
}