Class Duct

java.lang.Object
  |
  +--Duct

public class Duct
extends java.lang.Object

Copyright (c) Amish Parkh November 2001 Duct.java: The Duct class includes the private variables for representing the balls within the rectangular shaped duct.


Field Summary
 Ball[] ball
           
 
Constructor Summary
Duct(Rectangle rect, int nballs, int staticBalls)
          Constructor with three parameters
 
Method Summary
 void addBall(Ball b)
          Add one ball to the balls in the duct
 Ball getBall(int i)
          Get specific ball
 int getBallCount()
          Get ball count in duct
 Rectangle getRect()
          Get Rectangle
 int getStaticBallCount()
          Set Stationary duct ball count
 void increaseBalls()
          Increment the number of balls in the duct by one
 void setBall(Ball b, int i)
          Set specific ball
 void setStaticBallCount(int staticBalls)
          Set Stationary duct ball count
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ball

public Ball[] ball
Constructor Detail

Duct

public Duct(Rectangle rect,
            int nballs,
            int staticBalls)
Constructor with three parameters
Method Detail

increaseBalls

public void increaseBalls()
Increment the number of balls in the duct by one

addBall

public void addBall(Ball b)
Add one ball to the balls in the duct

getRect

public Rectangle getRect()
Get Rectangle

getBallCount

public int getBallCount()
Get ball count in duct

setStaticBallCount

public void setStaticBallCount(int staticBalls)
Set Stationary duct ball count

getStaticBallCount

public int getStaticBallCount()
Set Stationary duct ball count

getBall

public Ball getBall(int i)
Get specific ball

setBall

public void setBall(Ball b,
                    int i)
Set specific ball