Win a copy of Mesos in Action this week in the Cloud/Virtualizaton 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic