Summary Files Commits Branches @commit @diff @stats
path: root / Year 1 / Object-oriented Programming / Exam 2 Preparation / Truck.h
diff options
context:
space:
mode:
1 files changed, 9 insertions, 0 deletions
-rw-r--r--Year 1/Object-oriented Programming/Exam 2 Preparation/Truck.h9
diff --git a/Year 1/Object-oriented Programming/Exam 2 Preparation/Truck.h b/Year 1/Object-oriented Programming/Exam 2 Preparation/Truck.h
new file mode 100644
index 0000000..914a479
--- /dev/null
+++ b/Year 1/Object-oriented Programming/Exam 2 Preparation/Truck.h
@@ -0,0 +1,9 @@
+#include "Vehicle.h"
+
+class Truck : public Vehicle {
+public:
+ Truck(String brand, unsigned maxSpeed);
+
+ unsigned getSpeedOnRoad(Road road) const override;
+ Truck* clone() const override;
+};