bike2.BikeProject
Class Chain
java.lang.Object
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()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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.
Chain
public Chain()
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