diff options
Diffstat (limited to 'oop2w3/B.cpp')
-rw-r--r-- | oop2w3/B.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/oop2w3/B.cpp b/oop2w3/B.cpp new file mode 100644 index 0000000..6eb4bd2 --- /dev/null +++ b/oop2w3/B.cpp @@ -0,0 +1,28 @@ +#include <iostream> + +#include "A.h" +#include "B.h" + +B::B(A a) { + std::cout << "B::B(a)" << std::endl; + _a = &a; + _c = new C(); +} + +void B::even() { + std::cout << "B::even()" << std::endl; +} + +void B::odd(int i) { + std::cout << "B::odd(" << i << ")" << std::endl; +} + +void B::actie2(int i) { + std::cout << "B::actie2(" << i << ")" << std::endl; + actie3(); + if (i < 3) _c->actie4(); +} + +void B::actie3() { + std::cout << "B::actie3()" << std::endl; +} |