Banner

Design Patterns (Core Java)

(0 votes, average: 0 out of 5)

Desgin Patterns

Core Java

“Design Pattern”, what is this word?

In a very simple language we can say  “A general solution to a variety of similar problems”

But for software engineering, 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”.

There are different kinds of Design Patterns in Java.

Like:

(1) Creational

(2) Structural

 (3) Structural

Let’s talk about these in details.

 

Creational Patterns

   These are those patterns which help in creating a instance of a object. As we all know in java we create a new object using ‘new’ keyword. Like ….

Animal objAnimal= new Animal ();

What is the great thing that we can achieve by this pattern? Is there anything that we can do more? Any guess? Yes you are absolutely right we can create a instance dynamically. But the question is how? How can we achieve this? There are N numbers of different ways to do this. Which will suite to us? This Design Pattern can help us by providing 5 different Patterns to do.

Those are

(1)    Factory Pattern

(2)    Abstract  Factory Pattern

(3)    Builder Pattern

(4)    Prototype Pattern

(5)    Singleton Pattern

 

Factory Pattern

 

 

 

               

Structural Patterns

Behavioral Patterns   

Trackback(0)
Comments (0)Add Comment

Write comment

busy
Feedback Form