mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-10-12 06:14:07 +00:00
Improved the adapter pattern example. Updated the class diagram.
This commit is contained in:
1 parent
d4ee7a7da0
commit
b8365e9e4c
6 files changed
+33
-13
No files matched your search
@@ -3,14 +3,15 @@ package com.iluwatar;
|
||||
/**
|
||||
*
|
||||
* Adapter (GnomeEngineer) converts the interface of the
|
||||
* target class (GoblinGlider) into suitable one.
|
||||
* target class (GoblinGlider) into suitable one expected
|
||||
* by the client (GnomeEngineeringManager).
|
||||
*
|
||||
*/
|
||||
public class App
|
||||
{
|
||||
public static void main( String[] args )
|
||||
{
|
||||
GnomeEngineer engineer = new GnomeEngineer();
|
||||
engineer.operateDevice();
|
||||
GnomeEngineeringManager manager = new GnomeEngineeringManager();
|
||||
manager.operateDevice();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user