0
Pattern?
What are patterns? Are patterns just ideas like a blueprint for solving a problem? And you have to write the code your self. Or is there a library out there with code Exempels for every existing pattern.
4 ответов
+ 2
https://www.sololearn.com/learn/672/?ref=app
You can find more about design patterns here.
0
I know there is an existing Singelton Class so for this pattern I can inherit.
0
Qbix I took this lesson before I wrote my Question, but as anywere I found information around the topik of pattern, it is absolutlly abstract information. No coding exanpel.
Wedad Saleh I mentioned above that, I know the use of Singelton. By now I found an Observer- and an Observable Class so i can build the Observer-Pattern to.
Thanks to either of you for writing.
So my questions didn’t change, but now I more tend to believe there is a Class for each Patterns out there. If this is true, how am I supposed to find the right pattern.
Let’s say we write an java applet for “tic tac toe”. We could use a pattern to check if the last input completed a line of 3 x’s in case of Player1’s turn or 3 o’s in case of Player2’s turn.
But the time i spend to find the right patterninformatin is much higher then the time to simply solve the problem itself.
Patterns should be efficient, but from this point of view they don’t seem to be.