wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Interview question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Interview question" Watch "Interview question" New topic
Author

Interview question

Mala Sharma
Ranch Hand

Joined: Oct 29, 2004
Posts: 76
Hi,

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.

Regards,
Mala
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

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.


[Jess in Action][AskingGoodQuestions]
Arun Kumarr
Ranch Hand

Joined: May 16, 2005
Posts: 513

To add more: You can decide upon the components while you are designing your architecture and classes you do it later.
[ September 14, 2005: Message edited by: Arun Kumarr ]

If you are not laughing at yourself, then you just didn't get the joke.
Rick O'Shay
Ranch Hand

Joined: Sep 19, 2004
Posts: 531
Answer: it depends on the context but in general a component is a pluggable service. A component may consist of one or more classes plus any associated configuration resources.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Interview question
 
Similar Threads
Class level syncronization v/s Method level Syncronization
Diff between Abstrat class and Interface
Diff between Framework and API
Difference between Thread & Process
Difference between jsp:forward and forwardaction in struts