// car.h: the Car class, representing cars. class Car { private: double arrivalTime; double litresNeeded; public: // Constructor. // // The number of litres required is a property of a car, so it belongs in // this class. It is also something the car "knows" when it arrives, so it // should be calculated in the constructor. // // The distribution of litres required is uniform between 10 and 60 // (that is, sim->litresNeededMin and sim->litresNeededMin + sim-> // litresNeededRange). Car (); // getArrivalTime: return the car's arrival time. double getArrivalTime () { return arrivalTime; } // getLitresNeeded: return the number of litres of fuel needed by the car. double getLitresNeeded () { return litresNeeded; } // setArrivalTime: set the car's arrival time. void setArrivalTime (double time) { arrivalTime = time; } };