"I find television very educating. Every time somebody turns on the set, I go into the other room and read a book" Groucho Marx

3 books on Interfaces in OOP [PDF]

Updated: Oct 30, 2025 | Author:
Interfaces are similar to classes, but they have no implementation at all. In other words, interfaces are a named collection of abstract members. Interfaces represent behavior that a given class or structure can choose to implement. It's another way to implement polymorphism, because in different classes, members of the same interfaces will be implemented differently and therefore will respond differently to the same calls.

A class is said to implement an interface. Each class that implements an interface usually must fully define each of the interface members. At least, in C#, interface implementation works on the principle: all or nothing. You cannot choose what to implement and what not to implement. While class can inherit only one class, it can implement any number of interfaces. Interfaces can be used for inheritance, similar to the use of base classes. Another possibility, perhaps even more significant, is to use multiple interfaces to implement the "supports functionality" relationship (i.e., new functionality is added to an existing class).

In C#, there are standard interfaces, such as IСomparable and IСomparer - used for comparing objects. To use the Array.Sort() method to sort an array of user-defined objects, the user-defined class must implement the IСomparable interface (generic or not). This interface contains a prototype for a single method - CompareTo(object obj), which is used to perform object comparison. This method returns an integer value (-1, 0, 1).

To compare objects by two different attributes, you can use, in addition to the IСomparable interface, the IComparer interface, which contains a prototype for the Compare(object x, object y) method.

Here are some interesting PDF books about Interfaces in OOP:

C# OOP Step by Step: A Practical Guide with Examples
2025 by William E. Clark


Download PDF

Object-Oriented Programming with Python: Best Practices and Patterns
2024 by Robert Johnson


Download PDF

Java OOP Simplified: A Practical Guide with Examples
2025 by William E. Clark


Download PDF

See also: Top 10 eBook Organizers



How to download PDF:

1. Install Gooreader

2. Enter Book ID to the search box and press Enter

3. Click "Download Book" icon and select PDF*

* - note that for yellow books only preview pages are downloaded
Author: Maria Lin
Maria Lin, is a seasoned content writer who has contributed to numerous tech portals, including Mashable and bookrunch, as a guest author. She holds a Master's degree in Journalism from the University of California, where her research predominantly concentrated on mobile apps, software, AI and cloud services. With a deep passion for reading, Maria is particularly drawn to the intersection of technology and books, making book tech a subject of great interest to her. During her leisure time, she indulges in her love for cooking and finds solace in a good night's sleep. You can contact Maria Lin via email maria@bookrunch.com