This commit is contained in:
Ikshul Dureja 2020-12-16 12:30:19 +05:30
parent 444953ad43
commit 4252d8e5f3

View File

@ -11,31 +11,30 @@
int main() { int main() {
std::cout << "*******************" << std::endl; std::cout << "*******************" << std::endl;
std::cout << "** 设计模式例子 **" << std::endl; std::cout << "** <EFBFBD><EFBFBD><EFBFBD>ģʽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> **" << std::endl;
std::cout << "*******************" << std::endl; std::cout << "*******************" << std::endl;
std::cout << "*******************" << std::endl; std::cout << "*******************" << std::endl;
std::cout << "** 单例模式 **" << std::endl; std::cout << "** <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽ **" << std::endl;
std::cout << "*******************" << std::endl; std::cout << "*******************" << std::endl;
SingletonMain(); SingletonMain();
std::cout << "*******************" << std::endl; std::cout << "*******************" << std::endl;
std::cout << "** 抽象工厂模式 **" << std::endl; std::cout << "** <EFBFBD><EFBFBD><EFBFBD>󹤳<EFBFBD>ģʽ **" << std::endl;
std::cout << "*******************" << std::endl; std::cout << "*******************" << std::endl;
FactoryMain(); FactoryMain();
std::cout << "*******************" << std::endl; std::cout << "*******************" << std::endl;
std::cout << "** 适配器模式 **" << std::endl; std::cout << "** <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽ **" << std::endl;
std::cout << "*******************" << std::endl; std::cout << "*******************" << std::endl;
AdapterMain(); AdapterMain();
std::cout << "*******************" << std::endl; std::cout << "*******************" << std::endl;
std::cout << "** 桥接模式 **" << std::endl; std::cout << "** <EFBFBD>Ž<EFBFBD>ģʽ **" << std::endl;
std::cout << "*******************" << std::endl; std::cout << "*******************" << std::endl;
BridgeMain();
std::cout << "*******************" << std::endl; std::cout << "*******************" << std::endl;
std::cout << "** 观察者模式 **" << std::endl; std::cout << "** <EFBFBD>۲<EFBFBD><EFBFBD><EFBFBD>ģʽ **" << std::endl;
std::cout << "*******************" << std::endl; std::cout << "*******************" << std::endl;
ObserverMain(); ObserverMain();