bike2.BikeProject
Class Chain

java.lang.Object
  extended by bike2.BikeProject.Chain

public class Chain
extends java.lang.Object

Models the chain of a bike.

Author:
Tom James

Field Summary
private  Gear gear
          The first gear to which the chain is attached.
private  Gear gear2
          The second gear to which the chain is attached.
private  double rollingVelocity
          The rolling velocity of the chain.
 
Constructor Summary
Chain()
           
 
Method Summary
 void connectToGear(Gear gear, Gear gear2)
           
 double getRollingVelocity()
           
 void setRollingVelocity(double velocity)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

rollingVelocity

private double rollingVelocity
The rolling velocity of the chain.


gear

private Gear gear
The first gear to which the chain is attached.


gear2

private Gear gear2
The second gear to which the chain is attached.

Constructor Detail

Chain

public Chain()
Method Detail

connectToGear

public void connectToGear(Gear gear,
                          Gear gear2)
Parameters:
gear - The first gear to which the chain will be attached.
gear2 - The second gear to which the chain will be attached.

setRollingVelocity

public void setRollingVelocity(double velocity)
Parameters:
velocity - The rolling velocity to which the chain will be set.

getRollingVelocity

public double getRollingVelocity()
Returns:
The rolling velocity of the chain.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object