From a82a54f081ce561e6bc6e9f82869f8b40a47e660 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Wed, 25 May 2022 19:59:16 +0300 Subject: Added my work from today's exam --- .../Object-oriented Programming/Exam 2/ex1/AirTravel.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Year 1/Object-oriented Programming/Exam 2/ex1/AirTravel.cpp (limited to 'Year 1/Object-oriented Programming/Exam 2/ex1/AirTravel.cpp') 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; +} -- cgit v1.3.1-26-gb76a