C_CPP/src/08_PTRN/MP/Truck.cpp

17 lines
239 B
C++
Raw Normal View History

2018-03-09 09:47:53 +01:00
#include "Truck.hpp"
Truck::Truck(std::string model, int payload_kg)
: Vehicle(model)
{
_payload_kg = payload_kg;
}
int Truck::payload_kg(){
return _payload_kg;
}
Vehicle* Truck::clone(){
return new Truck(model(),_payload_kg);
}