bike2.BikeProject
Class Wheel

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

public class Wheel
extends java.lang.Object

Models the wheel of a bike.

Author:
Tom James

Field Summary
private  double angularVelocity
          The angular velocity of the wheel.
private  Axle axle
          The axle to which the wheel is attached.
private  double radius
          The radius of the wheel.
 
Constructor Summary
Wheel()
           
 
Method Summary
 void connectToAxle(Axle axle)
           
 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

radius

private double radius
The radius of the wheel.


angularVelocity

private double angularVelocity
The angular velocity of the wheel.


axle

private Axle axle
The axle to which the wheel is attached.

Constructor Detail

Wheel

public Wheel()
Method Detail

connectToAxle

public void connectToAxle(Axle axle)
Parameters:
axle - The axle to which the wheel will be attached.

setAngularVelocity

public void setAngularVelocity(double velocity)
Parameters:
velocity - The angular velocity to which the wheel will be set.

getAngularVelocity

public double getAngularVelocity()
Returns:
The angular velocity of the wheel.

setRadius

public void setRadius(double radius)
Parameters:
radius - The radius of the wheel.

getRadius

public double getRadius()
Returns:
The radius of the wheel.

setRollingVelocity

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

getRollingVelocity

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

toString

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