-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTruck.cpp
More file actions
28 lines (23 loc) · 738 Bytes
/
Truck.cpp
File metadata and controls
28 lines (23 loc) · 738 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include "Truck.h"
#include "Vehicle.h"
Truck::Truck():Vehicle() {
this->MaxWeight = 0;
this->MaxVolume = 0;
};
//call Vehicles constructor with arguments from Truck
Truck::Truck(string MakeAndModel, string LicensePlate, float GasUsage, float PricePerKm, float TotalKm, float MaxWeight, float MaxVolume) :Vehicle(MakeAndModel, LicensePlate, GasUsage, PricePerKm, TotalKm) {
this->MaxWeight=MaxWeight;
this->MaxVolume = MaxVolume;
};
float Truck::GetMaxWeight() {
return this->MaxWeight;
};
void Truck::SetMaxWeight(float MaxWeight) {
this->MaxWeight = MaxWeight;
};
float Truck::GetMaxVolume() {
return this->MaxVolume;
};
void Truck::SetMaxVolume(float MaxVolume) {
this->MaxVolume = MaxVolume;
};