I had a interview over telephone today where i was asked the difference between a "class" and a "component". To me this question made no sense so i basically told them the difference between class and a object. Is there an answer to the above asked question or was my understanding right (it was probably HR person conducting the interview). Any comments are welcomed.
There are a couple of different definitions of "component", but generally, a component is the smallest unit of software reusability. Sometimes it's one class, but usually it's a group of classes, together with published interfaces and documentation. By this definition, Lucene is a component. An EJB that provides credit-card charging is a component.