mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-19 17:28:48 +00:00
15 lines
291 B
Java
15 lines
291 B
Java
package com.iluwatar.dependency.injection;
|
|
|
|
/**
|
|
*
|
|
* Tobacco abstraction
|
|
*
|
|
*/
|
|
public abstract class Tobacco {
|
|
|
|
public void smoke(Wizard wizard) {
|
|
System.out.println(String.format("%s smoking %s", wizard.getClass().getSimpleName(), this
|
|
.getClass().getSimpleName()));
|
|
}
|
|
}
|