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?
No comments:
Post a Comment