Wednesday, October 19, 2011

OOAD questions...

Hey all,
This time I would like to post some interesting questions on Object Oriented Analysis and Design(OOAD). Okay, what would be the difference between OOA and OOD? well, Object Oriented Analysis speaks about the problem space while Design speaks about the solution for the problem.

Now-a-days C++, JAVA and C# are mostly used OOPL (Object Oriented Programming Languages). OOPL really gives you most effective solution for your problem through its key features: Encapsulation, Abstraction, Inheritance and Polymorphism. OOAD gives the most the effective design for your solution. OOAD is mostly done using different tools like Rational Rose, MS Visio...etc. These tools invariably use UML(Unified Modelling Language) notation to denote classes and their relationship. Class design can be arrived through various phases using OOAD:
a. Identifying use cases
b. Identifying actor for your problem space
c. Creating sequence diagram
d. Creating class diagram
For ex: Design of ATM machine

When dealing with OOAD questions, follow these small tips:
1.Don't have any assumption since the interviewer ask you vague question to see whether you ask for the right input or not. Ask questions like why and what for this design is.
2. Identify the CORE objects for your design.
3. Establish proper relationship between them.
4. Have all methods and other classes to to work with your problem space. Okay, let's move to questions corner now:

1. What is the difference between association, aggregation and composition?
2. What is interface and why it is needed?
3. When will you go for interface and class?
4. What is the difference between abstract class and interface?
5. What is the difference between abstraction and encapsulation?
6. Design IRCTC website using classes
7. What are all the things you consider while designing your class?
8. How will you be sure that the given class is for inheritance or for composition?
9. Let's say you need to create objects based on platform your app runs. You also need to give support for forthcoming platforms as well but which case your library users shouldn't get affected. How will you design this?


Monday, October 3, 2011

Some interesting Win32 questions

Some interesting Win32 questions:
1. Difference between worker thread and UI thread
2. How window is created in windows?
3. How my Win32 applications get messages?
4. Difference between application and thread
5. Difference between Critical section and mutex?
6. When my app is closed abruptly how do you close all threads appropriately?
7. How to implement my 5 threads accessing a shared file in read mode and 1 thread accessing the file in write mode?
8. How can you achieve async IO in file operation?

Saturday, October 1, 2011

Interesting C Programming interview questions

Hello all,
Everyone of us in software development field would have started our career with C programming language which is the powerful and structured PL. Even today lots of system programming like device driver development, firmware development and embedded system programming uses the most efficient C Programming language. Here I'd like to list down some of the interesting questions in this subject.

Interesting C Programming interview questions:

1. What is the difference between char *p[10] and char (*p) [10]?

2. Why union is required and give me some examples where you used it?

3. What is function pointer and where did you use that in your project?

4. Why static variable shouldn't be used in union?

5. How will you add two numbers without using + or ++ operator?

6. How will you reset the bit in a given position from the byte?

7. How will you toggle all the bits in byte?