thanks for suggestions but ı have too short time to read a book and to try to understand ı need short way It did not work when ı tried to make my project by reading .I could not correlate theory with realty for example ı wonder adapter method and ı read about it many article but ı could not apply this project
(You have bought from some programmer a new class implementation Window with the following interface (it is a very powerful class, well written and efficient in use)
class Window {
public void showWindow(String title, int sizex, int sizey);
public void moveWindow(int dx, int dy);
public void closeWindow();
public void writeText(int x, int y, String text);
}
But you have a lot of programs already using another class representing windows with the following interface
interface WindowInterface {
public void CreateWindow(int x, int y, String title);
public void MoveTo(int dx, int dy);
public void Close();
public void Text(String s, int x, int y);
}
You had an old window class (but you don't like it any more and you want to stop using it).
class OldWindow implements WindowInterface { ... }
Write a new class-adapter (object-adapter), using the new bought implementation but having the legacy interface
)