コード例 #1
0
ファイル: BeverageTestDrive.java プロジェクト: chj8143/j2_
  public static void main(String[] args) {

    Coffee caramelMacchiato = new CaramelMacchiato();

    System.out.println("\n-------[caramel macchiato]-------");
    caramelMacchiato.prepareRecipe();
  }
コード例 #2
0
 public static void main(String[] args) {
   Tea tea = new Tea();
   Coffee coffee = new Coffee();
   System.out.println("Making tea...");
   tea.prepareRecipe();
   System.out.println("Making coffee...");
   coffee.prepareRecipe();
 }
コード例 #3
0
  public static void main(String[] args) {

    Tea tea = new Tea();
    Coffee coffee = new Coffee();

    System.out.println("\nMaking tea...");
    tea.prepareRecipe();

    System.out.println("\nMaking coffee...");
    coffee.prepareRecipe();

    TeaWithHook teaHook = new TeaWithHook();
    CoffeeWithHook coffeeHook = new CoffeeWithHook();

    System.out.println("\nMaking tea...");
    teaHook.prepareRecipe();

    System.out.println("\nMaking coffee...");
    coffeeHook.prepareRecipe();
  }
コード例 #4
0
ファイル: Barista.java プロジェクト: Kim-Hyeji/j2
 public static void main(String[] args) {
   Tea tea = new Tea();
   Coffee coffee = new Coffee();
   coffee.prepareRecipe();
   tea.prepareRecipe();
 }