Skip to content

Commit a7ef9ad

Browse files
Update README.md
1 parent ede37bd commit a7ef9ad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

strategy/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ tag:
1818

1919
## Intent of Strategy Design Pattern
2020

21-
Define a family of algorithms in Java, encapsulate each one, and make them interchangeable to enhance software development using the Strategy design pattern. Strategy lets the algorithm vary independently of the clients that use it.
21+
Encapsulate a family of related algorithms in Java and make them interchangeable without modifying the clients that use them.
2222

2323
## Detailed Explanation of Strategy Pattern with Real-World Examples
2424

2525
Real-world example
2626

27-
> A practical real-world example of the Strategy design pattern in Java is evident in car navigation systems, where algorithm flexibility is paramount. Different navigation algorithms (such as shortest route, fastest route, and scenic route) can be used to determine the best path from one location to another. Each algorithm encapsulates a specific strategy for calculating the route. The user (client) can switch between these algorithms based on their preferences without changing the navigation system itself. This allows for flexible and interchangeable navigation strategies within the same system.
27+
> A practical real-world example of the Strategy design pattern in Java can be seen in car navigation systems, where algorithm flexibility is paramount. Different navigation algorithms (such as shortest route, fastest route, and scenic route) can be used to determine the best path from one location to another. Each algorithm encapsulates a specific strategy for calculating the route. The user (client) can switch between these algorithms based on their preferences without changing the navigation system itself. This allows for flexible and interchangeable navigation strategies within the same system.
2828
2929
In plain words
3030

0 commit comments

Comments
 (0)