From 30df0565e2263463e3a1f1005b63c16c36384df8 Mon Sep 17 00:00:00 2001 From: Hello_User Date: Wed, 26 Apr 2023 14:39:59 +0200 Subject: [PATCH] Opdracht 1 final, "begin" opdracht 2 Co-authored-by: Aryan Lala (19097727) --- Opdracht_1/Interface.cpp | 2 +- Opdracht_1/Interface.h | 9 +- Opdracht_1/Positie.cpp | 4 +- Opdracht_1/Positie.h | 4 +- Opdracht_1/Robot.cpp | 2 +- Opdracht_1/Robot.h | 9 +- Opdracht_1/class.drawio | 26 ++-- Opdracht_1/main | Bin 0 -> 26904 bytes Opdracht_2/class_1a.drawio | 268 +++++++++++++++++++++++++++++++++++++ Opdracht_2/main.cpp | 0 10 files changed, 298 insertions(+), 26 deletions(-) create mode 100755 Opdracht_1/main create mode 100644 Opdracht_2/class_1a.drawio create mode 100644 Opdracht_2/main.cpp diff --git a/Opdracht_1/Interface.cpp b/Opdracht_1/Interface.cpp index abceb10..2157487 100644 --- a/Opdracht_1/Interface.cpp +++ b/Opdracht_1/Interface.cpp @@ -1,5 +1,5 @@ #include "Interface.h" -Interface::Interface(){ +Interface::~Interface(){ } \ No newline at end of file diff --git a/Opdracht_1/Interface.h b/Opdracht_1/Interface.h index e0391b6..fbb415c 100644 --- a/Opdracht_1/Interface.h +++ b/Opdracht_1/Interface.h @@ -5,10 +5,9 @@ class Interface { private: public: -Interface(); -virtual ~Interface(){}; -virtual int x() = 0; -virtual int y() = 0; -virtual void move(int, int) = 0; + virtual ~Interface(); + virtual int x() const = 0; + virtual int y() const = 0; + virtual void move(int, int) = 0; }; #endif \ No newline at end of file diff --git a/Opdracht_1/Positie.cpp b/Opdracht_1/Positie.cpp index f72c8e7..a5664b9 100644 --- a/Opdracht_1/Positie.cpp +++ b/Opdracht_1/Positie.cpp @@ -8,11 +8,11 @@ Positie::~Positie(){ } -int Positie::x(){ +int Positie::x() const{ return X; } -int Positie::y(){ +int Positie::y() const{ return Y; } diff --git a/Opdracht_1/Positie.h b/Opdracht_1/Positie.h index a736854..b3e6e61 100644 --- a/Opdracht_1/Positie.h +++ b/Opdracht_1/Positie.h @@ -10,8 +10,8 @@ private: public: Positie (int, int); ~Positie(); - virtual int x(); - virtual int y(); + virtual int x() const; + virtual int y() const; virtual void move (int, int); }; diff --git a/Opdracht_1/Robot.cpp b/Opdracht_1/Robot.cpp index 394bb79..1d82733 100644 --- a/Opdracht_1/Robot.cpp +++ b/Opdracht_1/Robot.cpp @@ -1,5 +1,5 @@ #include "Robot.h" -#include "Positie.h" +#include "Interface.h" #include diff --git a/Opdracht_1/Robot.h b/Opdracht_1/Robot.h index bb7dd56..9a8a04f 100644 --- a/Opdracht_1/Robot.h +++ b/Opdracht_1/Robot.h @@ -6,13 +6,12 @@ class Interface; class Robot{ private: -Interface *P; -//Positie *P = dynamic_cast(I); + Interface *P; public: Robot (Interface*); - virtual ~Robot(); - void run(); - void show(); + ~Robot(); + virtual void run(); + virtual void show(); }; #endif \ No newline at end of file diff --git a/Opdracht_1/class.drawio b/Opdracht_1/class.drawio index 047a98c..bea0a17 100644 --- a/Opdracht_1/class.drawio +++ b/Opdracht_1/class.drawio @@ -1,42 +1,48 @@ - + - + - + - + - + - + - + - + - + - + + + + + + + diff --git a/Opdracht_1/main b/Opdracht_1/main new file mode 100755 index 0000000000000000000000000000000000000000..d94592d405f839f1e57e7da36be57820648a8d3b GIT binary patch literal 26904 zcmeHQ4RBo5b-pWEwnB`(@()#PPgxlUjDHqM7PcG;JXuY1q9}Bnlqn=3nWW9opCOHhK*x1jM_>g*+v#9nGM)};J((~g$AsFc)4FY7 z`<;8w*?s%8kA@`EAWTyYK4#+;{zZv0d#Ip^%bNp>9*eO@=KEnXOW1 z4``OLW_7i)RGo^bg+LbIXK4vhvnTXyg%Jp?X1z*Kva6*XO|25TMsrFDl?aKFU9nia zYv}Psh83#9h9|o!+GSpG`-Il9Q=y_)s4qgsC=p8&q2J~Bg}Uu1H{s1jJ$$RN6S{`& z;?fw7i_%4QXW8y7+X+>iPoa`eaznpn_S;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q_aoud4uC#g%iF?o&GEl1Myj_gbzcczrrPeCQ>KUCyyAukMGsF(vN1 z?`V}H=gv9uL-{Kl8Sv(?nDn(7F)ui5V&b)c=dFJ1v#zl#I;yA`RGZGKO^4g8SxjP6 zZPVyr_TJLKOy>}VEtr{1a=RCcE$h*!q!Eqt`<8AarzE zCcBczS>wiVJ4+Xnp10PsCyrtVpFlfRbaZ0aN%Vp`IYS3!PtPO9P^>RK1~Ow&OpV2g z(GD&S3Q+G@8tav(aRH(stl_*_|A8j;!NlmGiY6yAsKQVur=lb|gmtHB!nB*QA;aId z1R3z&$PlgwXz)`}CpC^OjhT>T^@$u!4e}^Cn1roxaEkS(Q{#Q95ywW0aQ+@TXxeG2oOA1||yY0u>Ue@VfSE5b# z;H9O*V=vFw9>a4BDiOUcZoKw)LiF$WW<}aR!}ZUwz1$Du_D2_Q{0X3Rk0kb2*!~LJ z)4JYNsExEM_HzH421cr4uc|C?D1756-vJqLe*W))fWE;Id-?8W69-JsbE!!Dq9^o| zkkL0i!pnC(aW3;W75w2=;oA;2@W%fwwwL^?h-EY*hRhmL*h>Bc_%?PZ zezBM5ShEqM@vtFn^W>!BaEcHwl;Lk@Ejwc-t$y&`YqPcSCZRI&_4Xrd ze_RZiMm+pgFs8mM_VT_9j!2=t;E_x6oRTy*!tk zV|z;snTnmzI*+|P*I8e047~k?Vs)1r0FW + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Opdracht_2/main.cpp b/Opdracht_2/main.cpp new file mode 100644 index 0000000..e69de29