Interface or an Abstract Class: which one to use?

Technology CommunityCategory: OOPInterface or an Abstract Class: which one to use?
VietMX Staff asked 3 years ago
  • Use an interface when you want to force developers working in your system (yourself included) to implement a set number of methods on the classes they’ll be building.
  • Use an abstract class when you want to force developers working in your system (yourself included) to implement a set numbers of methods and you want to provide some base methods that will help them develop their child classes.