Advertisement
Guest User

Untitled

a guest
Aug 7th, 2008
1,300
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. interface ChatService
  2. {
  3.     public void logout();
  4. }
  5.  
  6. class YahooChat implements ChatService
  7. {
  8.     public void logout()
  9.     {
  10.         //implementation here...
  11.     }
  12.    
  13.     ....
  14. }
  15.  
  16. class MsnChat implements ChatService
  17. {
  18.     public void logout()
  19.     {
  20.         //implementation here
  21.     }
  22. }
  23.  
  24. class SomeClientClass
  25. {
  26.     private ChatService chatservice;
  27.     ...
  28.    
  29.     void logout()
  30.     {
  31.         chatservice.logout();
  32.     }
  33. }
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement