Need help quickly Please answer completely Thank you Explain
Need help quickly. Please answer completely. Thank you!
Explain interface and implementation files, and why the two files are good practiceSolution
An interface is collection of abstract methods that is only declaration of method and it someone else\'s duty to define these as per the requirement. It cannot be instantiated and is implemented by a class instead of extending.
We have separate implementation file(which is nothing but a normal class which implements the interface and uses its methods and defines those) in order to make use of the methods as per our requirement and as requirements keep on changing we can directly do the required changes in implementation file and it could be the case this interface is implemented by multiple files and requirement is as such that you need change only in one file then this way of implementation makes it easy and we can make changes only in the required file without touching others.
