Summary Files Commits Branches @commit @diff @stats
path: root / Year 1 / Object-oriented Programming / Exam 2 / ex1 / AirTravel.cpp
diff options
context:
space:
mode:
1 files changed, 15 insertions, 0 deletions
-rw-r--r--Year 1/Object-oriented Programming/Exam 2/ex1/AirTravel.cpp15
diff --git a/Year 1/Object-oriented Programming/Exam 2/ex1/AirTravel.cpp b/Year 1/Object-oriented Programming/Exam 2/ex1/AirTravel.cpp
new file mode 100644
index 0000000..d065206
--- /dev/null
+++ b/Year 1/Object-oriented Programming/Exam 2/ex1/AirTravel.cpp
@@ -0,0 +1,15 @@
+#include "AirTravel.h"
+
+AirTravel::AirTravel() : AirTravel("", 0) {}
+
+AirTravel::AirTravel(const char* flightNumber, unsigned duration) : flightNumber(flightNumber) {
+ this->duration = duration;
+}
+
+String AirTravel::getFlightNumber() const {
+ return flightNumber;
+}
+
+unsigned AirTravel::getDuration() const {
+ return duration;
+}