#include<iostream>
using namespace std; class SubSystemOne { public: void MethodOne() { cout<<"system method 1 "<<endl; } }; class SubSystemTwo { public: void MethodTwo() { cout<<"system method 2 "<<endl; } }; class SubSystemThree { public: void MethodThree() { cout<<"system method 3 "<<endl; } }; class SubSystemFour { public: void MethodFour() { cout<<"system method 4 "<<endl; } }; class Facade { SubSystemOne *one; SubSystemTwo *two; SubSystemThree *three; SubSystemFour *four; public: Facade() { one = new SubSystemOne(); two = new SubSystemTwo(); three = new SubSystemThree(); four = new SubSystemFour(); } void MethodA() { cout<<"method a..."<<endl; one->MethodOne(); two->MethodTwo(); } void MethodB() { cout<<"method b..."<<endl; three->MethodThree(); four->MethodFour(); } }; int main() { Facade *facade = new Facade(); facade->MethodA(); facade->MethodB(); return 0; }