In object oriented programming we aall know about a class. A class is a template to create an object in runtime. But what is a component?
A component can be considered as a set of classes. For small software applications, building a few classes is sufficient to build the software application. But for large software applications there could be hundreds of classes. Many of these classes may be doing almost the same thing. This means if we write all these classes individually then we are repeating code many times. This is not a good practice. Code reuse should be done as much as possible.
To reuse code residing inside a class so that it can be used for building other similar classes we need to find out ways. One way is to use interfaces and design patterns which will allow a code base to be used for many classes. We can thus build an interface class and then use this interface to build all the smilar classes. The interface and all the classes derived from this interface can be collectively called a software component. A software component thus resembles components used in many industries.