/**
   This program tests the Car class.
*/
public class CarTester
{ 
   public static void main(String [] args)
   { 
      Car myHybrid = new Car(50); // 50 miles per gallon 
      
      myHybrid.addGas(20); 
      myHybrid.drive(500); 
      
      double gasLeft = myHybrid.getGas(); 
      
      System.out.print("Gas left = ");
      System.out.print(gasLeft);
      System.out.println(" gallons"); 

      myHybrid.addGas(10); 
      myHybrid.drive(200); 
      
      gasLeft = myHybrid.getGas(); 
      
      System.out.print("Gas left = ");
      System.out.print(gasLeft);
      System.out.println(" gallons"); 
   } 
}
