Summary Files Commits Branches @commit @diff @stats
path: root / Year 1 / Object-oriented Programming / Exam 2 Preparation / Vehicle.cpp
diff options
context:
space:
mode:
1 files changed, 12 insertions, 0 deletions
-rw-r--r--Year 1/Object-oriented Programming/Exam 2 Preparation/Vehicle.cpp12
diff --git a/Year 1/Object-oriented Programming/Exam 2 Preparation/Vehicle.cpp b/Year 1/Object-oriented Programming/Exam 2 Preparation/Vehicle.cpp
new file mode 100644
index 0000000..2d06f14
--- /dev/null
+++ b/Year 1/Object-oriented Programming/Exam 2 Preparation/Vehicle.cpp
@@ -0,0 +1,12 @@
+#include "Vehicle.h"
+
+Vehicle::Vehicle(const String& brand, unsigned maxSpeed) {
+ this->brand = brand;
+ this->maxSpeed = maxSpeed;
+}
+
+unsigned Vehicle::getMaxSpeed() const {
+ return maxSpeed;
+}
+
+Vehicle::~Vehicle() {}