Category : C++ Source Code
Archive   : CPPTUT.ZIP
Filename : VEHICLE.CPP

 
Output of file : VEHICLE.CPP contained in archive : CPPTUT.ZIP
// Chapter 7 - Program 2
#include "vehicle.h"



// initialize to any data desired
void vehicle::initialize(int in_wheels, float in_weight)
{
wheels = in_wheels;
weight = in_weight;
}


// get the number of wheels of this vehicle
int vehicle::get_wheels()
{
return wheels;
}


// return the weight of this vehicle
float vehicle::get_weight()
{
return weight;
}


// return the weight on each wheel
float vehicle::wheel_loading()
{
return weight/wheels;
}


  3 Responses to “Category : C++ Source Code
Archive   : CPPTUT.ZIP
Filename : VEHICLE.CPP

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/