Your SlideShare is downloading. ×
  • Like
Stoop ed-dual interface
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply
Published

 

Published in Technology , Business
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
189
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
1
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Stéphane Ducasse 1 Stéphane Ducasse stephane.ducasse@inria.fr http://stephane.ducasse.free.fr/ Design Points - Dual Interfaces Stéphane Ducasse --- 2005
  • 2. S.Ducasse 2 Clients? • Clients • Subclasses
  • 3. S.Ducasse 3 What are the consequences? A { private x ; void foo(){ ... x ...} }
  • 4. S.Ducasse 4 What can I do as a subclass? I cannot access x I cannot replace x I cannot extend!
  • 5. S.Ducasse 5 The idiom is Fields are private AND you provide protected accessors OR Fields are protected
  • 6. S.Ducasse 6 Benefits Your clients cannot access your fields But your subclasses are empowered
  • 7. S.Ducasse 7 Two users
  • 8. S.Ducasse 8 Two Users
  • 9. S.Ducasse 9 Clients A class has always two clients: its clients and its extenders
  • 10. S.Ducasse 9 Clients A class has always two clients: its clients and its extenders