No, the real purpose of a class is not to export data. Rather, it is to provide services. Class provides a way to abstract behaviour rather than just encapsulating the bits.
b.) What things would you remember while making a interface?
- A class’s interface should be sensible enough. It should behave the way user expects it to.
- It should be designed from the outside in.