Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Example of using aggregation.
- *
- * Here if a Telephone is deleted, the screen can still exist.
- */
- Class Ecran;
- Class Telephone{
- Ecran screen;
- public void Telephone(Ecran screen){
- this.screen = screen;
- }
- }
- main(){
- Ecran screen = new Ecran();
- Telephone tel = new Telephone(screen);
- }
Add Comment
Please, Sign In to add comment