Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Abstract Clas vs Interface

 
sahidul karim
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Give me some practical scenario where should i use interface and where i ll go for abstarct class.
 
Adeel Ansari
Ranch Hand
Posts: 2874
 
Jan Groth
Ranch Hand
Posts: 456
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
wrong forum mate...
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In layered programming go for interfaces.So that one team can make the layer with the interface without bothering about the implementation of that interface.
Abstract class is used to represent something in OO concept where someof the common implementation are common and some are case specific.So you can define the common functionalities as concrete and leave remaining as abstract to be implemented by the class which would extend this class.
 
Jeroen T Wenting
Ranch Hand
Posts: 1847
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is asked at least once a week, why don't you search the archives (or better yet, get a decent book on software design principles)?
 
karthikeyan Chockalingam
Ranch Hand
Posts: 259
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic