#include #include using namespace std; // Implementera dina klasser här. int main() { int value{0}; Add a1{3}; Square s1{}; Add a2{1}; Square s2{}; std::vector behaviours { &a1, &s1, &a2, &s2 }; for ( Behaviour* behaviour_pointer : behaviours ) { value = (*behaviour_pointer).apply(value); } std::cout << value << std::endl; }