I just wanna understand what is the difference between State & Strategy design pattern.
I read multiple articles, and almost got it. To make it perfect wanna see a real life example and appreciate it from some java library. e.g. for Strategy it's a Comparator
sent into TreeSet
.
Help me please to find the same for State. Please, don't make it up by yourself, i read many of them, e.g. TrafficLight, etc. I need exactly from a standard java lib. ( Ok if nobody provide java example I'll accept an example from other programming languages libs or even script languages, but java appreciated )
Aucun commentaire:
Enregistrer un commentaire