Results 1 to 2 of 2

Thread: Cafe Sample

  1. #1
    Join Date
    Sep 2008
    Location
    Mannheim,Germany
    Posts
    125

    Question Cafe Sample

    Hi, I have been going thru the Documentation and understand how the example works. I have a question regarding the following code:
    Is there a business services not shown in this example cos Im wondering where did the Drink Types and place order come from??? If theres a business service how would it look like for example??Or have I misunderstood it??Would appreciate some help

    Drink hotDoubleLatte = new Drink(DrinkType.LATTE, 2, false);
    Drink icedTripleMocha = new Drink(DrinkType.MOCHA, 3, true);
    order.addDrink(hotDoubleLatte);
    order.addDrink(icedTripleMocha);
    for (int i = 0; i < 100; i++) {
    cafe.placeOrder(order);
    Last edited by ashleyvijay; Oct 14th, 2008 at 02:46 AM.

  2. #2
    Join Date
    May 2007
    Location
    Netherlands
    Posts
    614

    Default

    The <gateway/> element will create an implementation of the Cafe interface on the fly with an appropriate placeOrder() implementation. DrinkType is imported, so nothing special there.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •