package com.iluwatar.dependency.injection;

/**
 * The MIT License
 * Copyright (c) 2014-2017 Ilkka Seppälä
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */


/**
 *
 * AdvancedSorceress implements inversion of control. It depends on abstraction that can be injected
 * through its setter.
 *
 */
public class AdvancedSorceress implements Wizard {

    private Tobacco tobacco;

    public void setTobacco(Tobacco tobacco) {
        this.tobacco = tobacco;
    }

    @Override
    public void smoke() {
        tobacco.smoke(this);
    }
}

@@ -104,24 +104,28 @@
  Sepp%C3%A4l%C3%A4%0D%0A *
+ %3Cp%3E
 %0D%0A * Permiss
@@ -569,24 +569,28 @@
 ditions:%0D%0A *
+ %3Cp%3E
 %0D%0A * The abo
@@ -712,24 +712,28 @@
 oftware.%0D%0A *
+ %3Cp%3E
 %0D%0A * THE SOF
@@ -1418,18 +1418,16 @@
 rd %7B%0D%0A%0D%0A
-  
   privat
@@ -1448,18 +1448,16 @@
 cco;%0D%0A%0D%0A
-  
   public
@@ -1497,20 +1497,16 @@
  %7B%0D%0A    
- 
-   
 this.tob
@@ -1526,19 +1526,15 @@
 o;%0D%0A
-  
   %7D%0D%0A%0D%0A
-  
   @O
@@ -1542,18 +1542,16 @@
 erride%0D%0A
-  
   public
@@ -1571,20 +1571,16 @@
  %7B%0D%0A    
- 
-   
 tobacco.
@@ -1593,18 +1593,16 @@
 this);%0D%0A
-  
   %7D%0D%0A%7D%0D%0A

Update AdvancedSorceress.java