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 0000000..d94592d Binary files /dev/null and b/Opdracht_1/main differ diff --git a/Opdracht_2/class_1a.drawio b/Opdracht_2/class_1a.drawio new file mode 100644 index 0000000..429406a --- /dev/null +++ b/Opdracht_2/class_1a.drawio @@ -0,0 +1,268 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ 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