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

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

Stoop ed-dual interface

202
views

Published on

Published in: Technology, Business

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
202
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
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