Q. What is an Interface? How does it differ from a Class?
A. An interface is a contract only. It only contains method description, no concrete method. It can’t be instantiated.
Q. Explain the basic functionality of garbage collector.
A. It manages the allocation and release of memory. It automatically releases the orphan objects from memory. It can’t be controlled. Sometime it can be executed by force.
Q. When re-throwing exceptions should you use throw ex; or throw;?
A. The good technique is to use throw ; to keep the stack trace intact.
Q. If a method is marked as protected internal who can access it?
A. This method can be accessed in derived classes and in the same assembly.
Q. What is a delegate?
A. The delegate is the pointer to function and is often used for callback events.
Q. What is the difference between a process and a thread?
A. A process is the program unit and there can be more than one processes in an application. The process in turn can have multiple threads which are allocated a processing time.
Q. What is Encapsulation?
A. Encapsulation is the term of OOP which has the same purpose as the literal meanings. Using encapsulation means keeping the object and its properties and behavior in single boundary.
Q. Describe a strategy for designing and building components that minimizes recompiling of client applications when the component is updated.
A. It can be handled by using distributed mechanism. In past it was done using DCOM and COM+ and recently it is achieved by WCF services.
Q. What is a postback?
A. Postback is an event of sending a pre-loaded page back to server. Like writing the URL on browser loads the page for the first time and when user clicks to some button or do some operation and submits the form back to server, it is called postback.
Q. What is a cookie?
A. A cookie is client side mechanism to store state. The data is stored on client machine.
Q. If you had the opportunity to change your current software development processes what would you change and why?
A. It all depends on the circumstances. First of the all I would be looking into the problem areas (if there is any) and solve them first according to requirement.
If I would need to change the architecture, I would be moving towards scalable, reusable, optimized, maintainable type of approach.
Q. What do you find most frustrating about software development?
A. Talking about my previous experience, I feel frustrated when the things are done in chaotic manner like no process, no rule, not enough time as these all contribute to the poor quality product.
Q. What are the important items that should be defined in a Functional Design Specification (document to capture high level design to be signed off with a client)?
A. The functional design specification contains all the functional requirements of the system, so it should be focused on What approach rather than How. The requirement should be clear and precise. If required (according to the User), it should include Use Case diagrams and some cases the GUIs to clearly portray the requirement and get them vet.
Q. I want to store my compact disk collection in a database and I want to store the following information for each compact disk:-
- Artist’s name
- Album title
- Date acquired
- Genre or type of music
- The name of each track
- The duration of each track
- If it is a single or a double CD
- If I own the CD or I’ve “borrowed” it from a friend
Could you please create a normalised database design that will enable me to store this information? Please limit your answer to the tables and columns required including the data type of each column and if it is a primary or foreign key.
Q. Assuming the database has been created and the data has been populated. Write an SQL statement to find all the “Pink Floyd” albums I own.
A. Select Album.* from Album inner join Artist
On Album.ArtistID = Artist.ID
Where ArtistName = ‘Pick Floyd’
Q. Write an SQL statement to count how many albums of each genre I have in my collection
A. Select Count(AlbumID) From Album Group by Genre