23種設計模式C++實例之中介者模式

#include <iostream> using namespace std; /* * 中介者模式 * 定義一箇中介對象來封裝系列對象之間的交互 * */ class Mediator; class Person { public: Person(string name, int sex, int condition, Mediator* mediator) {
相關文章
相關標籤/搜索