デザインパターン_ファセットモード


Facade Pattern
    
Provide a unified interface to a set of interfaces in a subsystem.Facade defines a higher-level interface that makes the subsystem easier to use.(サブシステムの外部とその内部との通信は統一されたオブジェクトによって行わなければならず、ゲートモードはサブシステムがより使いやすいように高レベルのインタフェースを提供する)
なぜこれもデザインモデルなのでしょうか? 
public interface ILetterProcess {
 public void writerContext(String context);
 public void fillEnvelope(String address);
 public void letterIntoEnvelope();
 public void sendLetter();
}
public class LetterProcess implements ILetterProcess {
 public void fillEnvelope(String address) {
  System.out.println("      :"+address);
 }
 public void letterIntoEnvelope() {
  System.out.println("      ");
 }
 public void sendLetter() {
  System.out.println("    ");
 }
 public void writerContext(String context) {
  System.out.println("    :"+context);
 }
}
public class ModenPostOffice {
 private ILetterProcess letterProcess=new LetterProcess();
 
 public void sendLetter(String context,String address){
  this.letterProcess.writerContext(context);
  this.letterProcess.fillEnvelope(address);
  this.letterProcess.letterIntoEnvelope();
  this.letterProcess.sendLetter();
 }
}
public class Client {
 
 public static void main(String[] args) {
  ModenPostOffice postOffice=new ModenPostOffice();
  postOffice.sendLetter("     ", "XX  ");
 }
}

メリット 
    フレキシブル
欠点
    開閉の原則に合わないので拡張できません
シーンの操作
    複雑なサブシステムまたはモジュールに外部アクセスインタフェースを提供する
    サブシステム相対独立
    低レベルの技術者がプロジェクト開発に参加することを予防し、個人コードの品質が全体プロジェクトに与える影響リスクを低減するために
私は菜鳥です.道にいます.