Interviewer And Interviewee Guide

Behavioral Design Patterns Interview Questions & Answers:

2. Suppose we have file(ps), dont know how many records are there. move half of the records to 2 files. how can we do?

Question confirmation: Move half-half records to 2 diff. files.

Precondition: You must be knowing how to read record.
Solution:
1. Read file from top.
2. Move each record in alternative file.

3. What is difference between Function Oriented Design and
Object Oriented design?

Function oriented design is dividing a bigger problem set
to small functional units and then
structure/organize/sequence these functional units to
design the solution.
OOD is identifying objects (entities) involved in the
system and designing solution based on their relationships
and interactions.
FOD approach is mainly used for computation sensitive
application, whereas OOD approach is mainly used for
evolving system which mimicks a business process or
business case.

4. What is design pattern?

A design pattern is a general reusable solution to a
commonly occurring problem in software design. A design
pattern is not a finished design that can be transformed
directly into code. It is a description or template for how
to solve a problem that can be used in many different
situations. Object-oriented design patterns typically show
relationships and interactions between classes or objects,
without specifying the final application classes or objects
that are involved.

Design patterns reside in the domain of modules and
interconnections. At a higher level there are Architectural
patterns that are larger in scope, usually describing an
overall pattern followed by an entire system.

5. What is difference between GoF and J2EE patterns?

GoF DESIGN PATTERN
==================
The Gang of Four were the first publishing a book about
design patterns. The patterns are rather basic in nature and
can be applied to almost any object oriented system.

J2EE DESIGN PATTERN
===================
J2EE patterns are much more specialized, obviously. Many are
in fact specialized versions of GoF patterns, applied to
problems specific to J2EE development.

6. What is Architecture and what is design? Are they related?

Architecture: Defines multi-layer design to implement a complex business solution and shows how each layer interact with each other efficiently. Depicts the different layers involved in the application. Addresses gray areas such as performance issues, high availability of the critical applications.

Design Models: Talks more about the individual components that build the complex application. It shows the relationship between these objects and how they are logically separated.

7. what is the difference between the Adapter Pattern and Proxy Patterns? its seems both are almost similar?

Comparing Adapter Pattern with other Patterns:

1. Adapter converts one interface to another, Decorator doesn't alter interface but adds responsibility. Facade makes an interface simpler.
Decorator is thus more transparent to the application than an adapter is. As a consequence, Decorator supports recursive composition, which isn't possible with pure Adapters.

2. Adapters allows client to make use of libraries and subsets without changing any code. Decorators allow new behaviour to be added to the classes with out altering the existing code.

3. Adapter make things work after they're designed, Bridge makes them work before they are.

4. Bridge is designed up-front to let the abstraction and the implementation vary independently. Adapter is retrofitted to make unrelated classes work together.

5. Adapter provides a different interface to its subject. Proxy provides the same interface. Decorator provides an enhanced interface.

6. Facade defines a new interface, whereas Adapter reuses an old interface. Remember that Adapter makes two existing interfaces work together as opposed to defining an entirely new one.

8. What are the advantages of asynchronous architectures?

Asynchronous architectures decouple senders and receivers.
This brings about performance advantages for both the sender
and the receiver. The sender is able to even out his
communication traffic over the course of a day. This is
helpful in cases where sender and receiver communicate over
low-bandwidth lengths. The receiver can even out its
processing load by processing the sender's message as time
permits.

9. Explain three types of components comprise an application design?

An application design is comprised of legacy components,
vendor products, and developmental software.

Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.