1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
#pragma once
#include "vehicle.h"
class truck : public vehicle
{
private:
bool hasBed;
string* bedType;
public:
truck(bool P_hasBed, string P_bedType, string P_name, string P_colour, int P_doors, engine* P_engine) : hasBed(P_hasBed), bedType(new string(P_bedType)), vehicle(P_name, P_colour, P_doors, P_engine)
{}
truck(bool P_hasBed, string P_name, string P_colour, int P_doors, engine* P_engine) : hasBed(P_hasBed), vehicle(P_name, P_colour, P_doors, P_engine)
{}
truck(const truck& obj) : hasBed(obj.hasBed), bedType(new string(obj.getBedType())), vehicle(obj) {}
void getDetails() const;
string getBedType() const;
};
|