Guest User

Untitled

a guest
Jan 19th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. /*
  2. * Example of using aggregation.
  3. *
  4. * Here if a Telephone is deleted, the screen can still exist.
  5. */
  6.  
  7. Class Ecran;
  8.  
  9.  
  10. Class Telephone{
  11. Ecran screen;
  12.  
  13. public void Telephone(Ecran screen){
  14. this.screen = screen;
  15. }
  16. }
  17.  
  18. main(){
  19. Ecran screen = new Ecran();
  20. Telephone tel = new Telephone(screen);
  21. }
Add Comment
Please, Sign In to add comment