구조 #pragma once #include #include #include class State { public: virtual void handle() = 0; }; class Context { private: State* state_; public: Context(State* state) { state_ = state; } void changeState(State* state) { state_ = state; } void request() { state_->handle(); } }; class StateA : public State { public: void handle() override { std::cout changeState(stateB); context->request(); system("..