I have a quite basic question:
When should we decide to use Interface or Class for a specific class?
For example: says we have 2 classes, Customer and Doctor.
In Inheritance (class): we could set these 2 classes to inherit from parent class Person.
Couldn't we do the same with Interface? Says we have InterfacePerson and have both Customer and Doctor implement the interface?
Thus, this lead to: when do we decide to use one over the other and vice versa?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…