From a3deadcf8d96bbe4d284ee6e691ef4127f816790 Mon Sep 17 00:00:00 2001 From: Theodoros Tzimas <79987161+theodorostzimas02@users.noreply.github.com> Date: Fri, 29 Mar 2024 19:00:48 +0200 Subject: [PATCH] drones 7pm --- code_task/drones.cpp | 71 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 code_task/drones.cpp diff --git a/code_task/drones.cpp b/code_task/drones.cpp new file mode 100644 index 0000000..c3e58ce --- /dev/null +++ b/code_task/drones.cpp @@ -0,0 +1,71 @@ +#include +#include + + + +class Satelite{ + private: + String longtitude, latitude; + public: + Satelite(String longtitude,latitude){ + this.longtitude = longtitude; + this.latitude = latitude; + } + String getLongtitude(){ + return longtitude; + } + + String getLatitude(){ + return latitude; + } + + void setLongtitude(String longtitude){ + this.longtitude = longtitude; + return; + } + + void setLatitude(String latitude){ + this.latitude = latitude; + return; + } +}; + + +class fireScanner{ + private: + bool Alarmed; + String longtitude, latitude; + public: + void checkForFire(Satelite s1){ + if (Alarmed){ + longtitude = s1.getLongtitude(); + latitude = s1.getLatitude(); + } + return; + } + + String getLongtitude(){ + return longtitude; + } + + String getLatitude(){ + return latitude; + } + + bool getAlarm(){ + return Alarmed; + } +}; + + +class Drone{ + private: + fireScanner f1; + String longtitude, latitude; + public: + void move(){ //Αλλάζει το location του drone προς την φωτια. + + } + + +}; \ No newline at end of file