An Introduction Flashcards

1
Q

Design Patterns

A

A design pattern is a well-described solution to a common software problem.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Benefits of using Design Patterns

A
  1. Design Patterns are already defined and provides industry standard approach to solve a recurring problem, so it saves time if we sensibly use the design pattern. 2. Using design patterns promotes reusability that leads to more robust and highly maintainable code. It helps in reducing total cost of ownership (TCO) of the software product. 3. Since design patterns are already defined, it makes our code easy to understand and debug. It leads to faster development and new members of team understand it easily.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Three Catagories of Java Design Patters

A

creational, structural, and behavioral design patterns.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Creational Design Patterns

A

Creational design patterns provide solution to instantiate an object in the best possible way for specific situations. The basic form of object creation could result in design problems or add unwanted complexity to the design. Creational design patterns solve this problem by controlling the object creation by different ways.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Five Examples of Creational Design Patterns

A
  1. Singleton Pattern 2. Factory Pattern 3. Abstract Factory Pattern 4. Builder Pattern 5. Prototype Pattern
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Structural Design Patterns

A

Structural patterns provide different ways to create a class structure, for example using inheritance and composition to create a large object from small objects

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Seven Examples of Structural Design Patterns

A
  1. Adapter Design Pattern 2. Composite Pattern 3. Proxy Pattern 4. Flyweight Pattern 5. Facade Pattern 6. Bridge Pattern 7. Decorator Pattern
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Behavioral Design Patterns

A

Behavioral patterns provide solution for the better interaction between objects and how to provide lose coupling and flexibility to extend easily.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Examples of Design Patterns

A
  1. Template Method Pattern 2. Mediator Pattern 3. Chain of Responsibility 4. Observer Pattern 5. Strategy Pattern 6. Command Pattern 7. State Pattern 8. Visitor Pattern 9. Interpreter Pattern 10. Iterator Pattern 11. Memento Pattern
How well did you know this?
1
Not at all
2
3
4
5
Perfectly