public class Train
{
  /*******************************************************
    *                       Attributes
    ******************************************************/
  // The train's starting position (relative to the origin)
  private double startPosition;
  
  // The train's constant speed
  private double speed;
  
  /********************************************************
    *                        Methods
    *******************************************************/
  
  // Constructor  
  public Train(double somePos, double someSpeed)
  {
    //---------------------------------------//
    //             YOUR CODE GOES HERE       //
    //---------------------------------------//
    
  }
  
  /***************************
    *     Accessor Methods
    ***************************/
  
  /**
   * Pre: None
   * Post: Returns the value of the train's startPos
   * */
  public double getPosition()
  {
    //---------------------------------------//
    //             YOUR CODE GOES HERE       //
    //---------------------------------------//
    
  }
  
  /**
   * Pre: None
   * Post: Returns the value of the train's speed
   * */
  public double getSpeed()
  {
    //---------------------------------------//
    //             YOUR CODE GOES HERE       //
    //---------------------------------------//
    
  }
  
  /**
   * Pre: None
   * Post: Updates the train's startPos to a new value
   * */
  public void setPosition(double newPos)
  {
    //---------------------------------------//
    //             YOUR CODE GOES HERE       //
    //---------------------------------------//
    
  }
  
  /**
   * Pre: None
   * Post: Updates the train's speed to a new value
   * */
  public void setSpeed(double newSpeed)
  {
    //---------------------------------------//
    //             YOUR CODE GOES HERE       //
    //---------------------------------------//
    
  }
  
  /**
   * Pre: None
   * Post: Given a second train, computes the gap between the current train and the 
   * (given) second train.
   * */
  public double gap(Train secondTrain)
  {
    
    //---------------------------------------//
    //             YOUR CODE GOES HERE       //
    //---------------------------------------//
    
  }
 
}