This week's book giveaway is in the HTML/CSS/JavaScript forum.
We're giving away four copies of Practical SVG and have Chris Coyier on-line!
See this thread for details.
Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Abstract classes

 
Nigel Browne
Ranch Hand
Posts: 703
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it fair to say that an abstract class should only blueprint the methods that will be public in the classes which inherit from it ?
 
James Gray
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would say yes, mostly. If all you want to do is "blueprint" though, that's more aptly done with an Interface. Abstract classes should be used when you want to provide partial implementation and/or support to those future methods.
 
Nigel Browne
Ranch Hand
Posts: 703
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The reason for blueprinting with an abstract class. Is that I can use the same class regardless of the networking method I chose.
 
Let's go to the waterfront with this tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!