topical media & game development

talk show tell print

professional-program-10-MilesEstimator-MilesEstimator.c

? / professional-program-10-MilesEstimator-MilesEstimator.c


  include <MilesEstimator.h>
  
  int MilesEstimator::getMilesLeft() 
  {
    return getMilesPerGallon() * getGallonsLeft();
  }
  
  void MilesEstimator::setGallonsLeft(int inValue) 
  {
    mGallonsLeft = inValue; 
  }
  
  int MilesEstimator::getGallonsLeft() 
  { 
    return mGallonsLeft; 
  }
  
  int MilesEstimator::getMilesPerGallon() 
  { 
    return 20; 
  }
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.