|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbike2.BikeProject.Gear
public class Gear
Models the gear of a bike.
| Field Summary | |
|---|---|
private double |
angularVelocity
The angular velocity of the gear. |
private Axle |
axle
The axle to which the gear will be attached. |
private Chain |
chain
The chain to which the gear will be attached. |
private double |
radius
The radius of the gear. |
private double |
rollingVelocity
The rolling velocity of the gear. |
| Constructor Summary | |
|---|---|
Gear()
|
|
| Method Summary | |
|---|---|
void |
connectToAxle(Axle axle)
|
void |
connectToChain(Chain chain)
|
double |
getAngularVelocity()
|
double |
getRadius()
|
double |
getRollingVelocity()
|
void |
setAngularVelocity(double velocity)
|
void |
setRadius(double radius)
|
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 |
|---|
private double radius
private double angularVelocity
private double rollingVelocity
private Chain chain
private Axle axle
| Constructor Detail |
|---|
public Gear()
| Method Detail |
|---|
public void connectToChain(Chain chain)
chain - The chain to which the gear will be attached.public void connectToAxle(Axle axle)
axle - The axle to which the gear will be attached.public void setAngularVelocity(double velocity)
velocity - The angular velocity to which the axle will be set.public double getAngularVelocity()
public void setRadius(double radius)
radius - The radius of the gear.public double getRadius()
public void setRollingVelocity(double velocity)
velocity - The rolling velocity to which the gear will be set.public double getRollingVelocity()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||