employer cover photo
employer logo
employer logo

Tata Consultancy Services

Part of Tata Group

Engaged Employer

Tata Consultancy Services Interview Question

Explain the concepts of SOLID

Interview Answer

Anonymous

Mar 20, 2024

S:A class should have only one reason to change. Each class should have only one responsibility or should only be concerned with one aspect of the program's functionality. O:Software entities should be open for extension but closed for modification. Liskov Substitution : Objects of a superclass should be replaceable with objects of its subclasses without affecting the correctness of the program. Interface Segregation Principle (ISP): A client should not be forced to implement an interface that it doesn't use. Instead of having a large interface with many methods, split it into smaller and more specific interfaces so that clients only need to implement the methods they require.