Tags » Design Pattern

Singleton Design Pattern

Hey guys…. Today we are going to discuss about one of the easiest Java Design Pattern.

Here we go. This is about Singleton Design Pattern. 443 more words

Suy nghĩ trong anh về mẫu thiết kế “Adapter Pattern” (Phần Cuối)

Xin chào mọi người, hôm nay mình quay lại và sẽ đưa một demo nhỏ sử dụng Adapter Pattern mình thấy khá hay. Demo viết bằng javascript, mọi người có thể copy và qua  354 more words


Examples of Composite Design Pattern

Example 1:

Employee hierarchy in an Organization is classic example of modeling Composite design  pattern. Following are the details that are to be modeled:

  1. There are two type of employees; Manager, and Developer.
  2. 470 more words
Design Pattern

Design Pattern : Memento Pattern

Memento Design Pattern allows to capture internal state of an object in an external object and restore it to the desired checkpoint when required, all the while being in compliance with encapsulation. 280 more words

Best Practices

Write an algorithm such that if an element in an MxN matrix is 0, its entire row and column is set to 0

* @author asharda
public class Matrix {

public int [][] resetMatrix(int [][]a)
int row[]=new int ;
int []column=new int.length];
for(int i=0;i<a.length;i++) 122 more words

Fibonnaic series using Java

* Fibonnaci Series
* @author asharda
public class Fibonnaci {

public int getFib(int num)
return num;
return getFib(num-1)+getFib(num-2); 22 more words

Dynamic CRM Decorator Pattern

Have you ever curious why sometimes your plugins run very slow? Then you wonder where are the critical operation that makes all of operation slower? Of course you can investigate this in many ways: from database server perspective, network, etc. 187 more words